Version Description
- Fix like button when comments are disabled
- Fix max regenerate video thumb admin setting
- masonry layout fixes
- Fix drag n drop in activity page when attachment for activity is disabled
- Added missing og:image property in single rtMedia BuddyPress activity
- Fix likes translated in SQL query
- Fix activity photo after media edit
- Added JS alert when uploading is in progress
- Added membership add-on information
Download this release
Release Info
Developer | rtcamp |
Plugin | rtMedia for WordPress, BuddyPress and bbPress |
Version | 3.7.15 |
Comparing to | |
See all releases |
Code changes from version 3.7.14 to 3.7.15
- app/admin/RTMediaAdmin.php +523 -351
- app/admin/RTMediaFormHandler.php +601 -517
- app/assets/css/main.css +1 -1
- app/assets/img/rtmedia-membership-240x184.png +0 -0
- app/assets/js/rtMedia.backbone.js +13 -2
- app/assets/js/rtMedia.js +38 -29
- app/assets/sass/main.scss +4 -0
- app/helper/RTMediaActivityModel.php +7 -7
- app/helper/RTMediaAddon.php +150 -102
- app/helper/RTMediaAdminWidget.php +1 -1
- app/helper/RTMediaFeed.php +6 -7
- app/helper/RTMediaInteractionModel.php +17 -13
- app/helper/RTMediaLicense.php +8 -8
- app/helper/RTMediaModel.php +236 -192
- app/helper/RTMediaSettings.php +244 -239
- app/helper/RTMediaSupport.php +225 -279
- app/helper/RTMediaThemes.php +153 -119
- app/helper/RTMediaUploadException.php +29 -27
- app/helper/db/RTDBModel.php +126 -99
- app/helper/db/RTDBUpdate.php +78 -60
- app/helper/db/rt_plugin_info.php +20 -20
- app/helper/rtDimensions.php +53 -49
- app/helper/rtForm.php +296 -229
- app/helper/rtFormInvalidArgumentsException.php +5 -5
- app/helper/rtPluginUpdateChecker.php +7 -5
- app/helper/rtProgress.php +6 -6
- app/importers/BPMediaAlbumimporter.php +378 -374
- app/importers/BPMediaImporter.php +139 -136
- app/importers/RTMediaActivityUpgrade.php +120 -117
- app/importers/RTMediaMediaSizeImporter.php +50 -48
- app/importers/RTMediaMigration.php +946 -923
- app/main/RTMedia.php +17 -7
- app/main/contexts/RTMediaContext.php +94 -87
- app/main/controllers/activity/RTMediaActivity.php +27 -27
- app/main/controllers/activity/RTMediaBuddyPressActivity.php +194 -197
- app/main/controllers/media/RTMediaAlbum.php +501 -511
app/admin/RTMediaAdmin.php
CHANGED
@@ -25,7 +25,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
25 |
* @access public
|
26 |
* @return void
|
27 |
*/
|
28 |
-
public function __construct()
|
29 |
global $rtmedia;
|
30 |
|
31 |
// Actions and filters
|
@@ -33,7 +33,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
33 |
add_action( 'admin_init', array( $this, 'presstrends_plugin' ) );
|
34 |
|
35 |
//$rtmedia_feed = new RTMediaFeed();
|
36 |
-
add_filter(
|
37 |
//add_action ( 'wp_ajax_rtmedia_fetch_feed', array( $rtmedia_feed, 'fetch_feed' ), 1 );
|
38 |
$this->rtmedia_support = new RTMediaSupport();
|
39 |
add_action( 'wp_ajax_rtmedia_select_request', array( $this->rtmedia_support, 'get_form' ), 1 );
|
@@ -50,15 +50,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
50 |
add_action( 'wp_ajax_rtmedia_correct_upload_filetypes', array( $this, 'correct_upload_filetypes' ), 1 );
|
51 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_meta_premium_addon_link' ), 1, 4 );
|
52 |
add_action( 'wp_dashboard_setup', array( &$this, 'add_dashboard_widgets' ), 0 );
|
53 |
-
add_filter(
|
54 |
-
add_filter(
|
55 |
add_action( 'wp_ajax_rtmedia_hide_video_thumb_admin_notice', array( $this, 'rtmedia_hide_video_thumb_admin_notice' ), 1 );
|
56 |
add_action( 'wp_ajax_rtmedia_hide_addon_update_notice', array( $this, 'rtmedia_hide_addon_update_notice' ), 1 );
|
57 |
|
58 |
$obj_encoding = new RTMediaEncoding( true );
|
59 |
|
60 |
if ( $obj_encoding->api_key ){
|
61 |
-
add_filter(
|
62 |
add_action( 'admin_head-upload.php', array( $this, 'add_bulk_actions_regenerate' ) );
|
63 |
add_action( 'admin_footer', array( $this, 'rtmedia_regenerate_thumb_js' ) );
|
64 |
add_action( 'admin_action_bulk_video_regenerate_thumbnails', array( $this, 'bulk_action_handler' ) );
|
@@ -71,12 +71,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
71 |
$rtmedia->options = rtmedia_get_site_option( 'rtmedia-options' );
|
72 |
}
|
73 |
|
74 |
-
if ( isset
|
75 |
-
if ( isset
|
76 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
77 |
}
|
78 |
} else {
|
79 |
-
if ( intval( $rtmedia->options[
|
80 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
81 |
}
|
82 |
}
|
@@ -90,7 +90,6 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
90 |
if ( is_multisite() ){
|
91 |
add_action( 'network_admin_edit_rtmedia', array( $this, 'save_multisite_options' ) );
|
92 |
}
|
93 |
-
|
94 |
}
|
95 |
|
96 |
$this->rtmedia_settings = new RTMediaSettings();
|
@@ -98,7 +97,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
98 |
// show rtmedia advertisement
|
99 |
// if(! defined("RTMEDIA_PRO_VERSION") )
|
100 |
// add_action ( 'rtmedia_before_default_admin_widgets', array( $this, 'rtmedia_advertisement' ),1);
|
101 |
-
if ( ! class_exists(
|
102 |
add_action( 'admin_init', array( $this, 'check_permalink_admin_notice' ) );
|
103 |
}
|
104 |
|
@@ -106,7 +105,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
106 |
add_action( 'admin_init', array( $this, 'rtmedia_bp_add_update_type' ) );
|
107 |
add_action( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
|
108 |
$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
|
109 |
-
if( class_exists( 'BuddyPress' ) ){
|
110 |
$rtmedia_activity_upgrade = new RTMediaActivityUpgrade();
|
111 |
}
|
112 |
add_action( 'admin_notices', array( $this, 'rtmedia_admin_notices' ) );
|
@@ -122,10 +121,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
122 |
* Show rtmedia network admin notices.
|
123 |
*
|
124 |
* @access public
|
|
|
125 |
* @param void
|
|
|
126 |
* @return void
|
127 |
*/
|
128 |
-
public function rtmedia_network_admin_notices()
|
129 |
if ( is_multisite() ){
|
130 |
$this->upload_filetypes_error();
|
131 |
}
|
@@ -135,10 +136,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
135 |
* Show rtmedia admin notices.
|
136 |
*
|
137 |
* @access public
|
|
|
138 |
* @param void
|
|
|
139 |
* @return void
|
140 |
*/
|
141 |
-
public function rtmedia_admin_notices()
|
142 |
$this->upload_filetypes_error();
|
143 |
$this->rtmedia_regenerate_thumbnail_notice();
|
144 |
$this->rtmedia_addon_update_notice();
|
@@ -150,13 +153,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
150 |
* Show rtmedia inspirebook release notice.
|
151 |
*
|
152 |
* @access public
|
|
|
153 |
* @param void
|
|
|
154 |
* @return void
|
155 |
*/
|
156 |
-
public function rtmedia_inspirebook_release_notice()
|
157 |
-
$site_option = rtmedia_get_site_option(
|
158 |
-
if ( ( ! $site_option ||
|
159 |
-
rtmedia_update_site_option(
|
160 |
?>
|
161 |
<div class="updated rtmedia-inspire-book-notice">
|
162 |
<p>
|
@@ -183,14 +188,16 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
183 |
* Hide rtmedia inspirebook release notice.
|
184 |
*
|
185 |
* @access public
|
|
|
186 |
* @param void
|
|
|
187 |
* @return void
|
188 |
*/
|
189 |
-
public function rtmedia_hide_inspirebook_release_notice()
|
190 |
-
if ( rtmedia_update_site_option(
|
191 |
-
echo
|
192 |
} else {
|
193 |
-
echo
|
194 |
}
|
195 |
die();
|
196 |
}
|
@@ -199,10 +206,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
199 |
* Set rtmedia buddypress update type.
|
200 |
*
|
201 |
* @access public
|
|
|
202 |
* @param void
|
|
|
203 |
* @return void
|
204 |
*/
|
205 |
-
public function rtmedia_bp_add_update_type()
|
206 |
if ( class_exists( 'BuddyPress' ) && function_exists( 'bp_activity_set_action' ) ){
|
207 |
bp_activity_set_action( 'rtmedia_update', 'rtmedia_update', 'rtMedia Update' );
|
208 |
}
|
@@ -212,10 +221,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
212 |
* Show rtmedia check permalink admin notice.
|
213 |
*
|
214 |
* @access public
|
|
|
215 |
* @param void
|
|
|
216 |
* @return void
|
217 |
*/
|
218 |
-
public function check_permalink_admin_notice()
|
219 |
global $wp_rewrite;
|
220 |
if ( empty( $wp_rewrite->permalink_structure ) ){
|
221 |
add_action( 'admin_notices', array( $this, 'rtmedia_permalink_notice' ) );
|
@@ -226,10 +237,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
226 |
* Define rtmedia permalink notice.
|
227 |
*
|
228 |
* @access public
|
|
|
229 |
* @param void
|
|
|
230 |
* @return void
|
231 |
*/
|
232 |
-
public function rtmedia_permalink_notice()
|
233 |
echo '<div class="error rtmedia-permalink-change-notice">
|
234 |
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( ' You must ' ) . '<a href="' . admin_url( 'options-permalink.php' ) . '">' . __( 'update permalink structure' ) . '</a>' . __( ' to something other than the default for it to work.', 'rtmedia' ) . ' </p>
|
235 |
</div>';
|
@@ -239,19 +252,21 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
239 |
* Define rtmedia addon update notice.
|
240 |
*
|
241 |
* @access public
|
|
|
242 |
* @param void
|
|
|
243 |
* @return void
|
244 |
*/
|
245 |
-
public function rtmedia_addon_update_notice()
|
246 |
if ( ! $this->check_for_addon_update_notice() ){
|
247 |
return;
|
248 |
}
|
249 |
if ( is_rt_admin() ){
|
250 |
-
$site_option = rtmedia_get_site_option(
|
251 |
-
if ( ! $site_option ||
|
252 |
-
rtmedia_update_site_option(
|
253 |
echo '<div class="error rtmedia-addon-upate-notice">
|
254 |
-
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( 'Please update all premium add-ons that you had purchased from rtCamp from your ', 'rtmedia' ) . ' <a href="https://rtcamp.com/my-account/" target="_blank">' . __( 'account',
|
255 |
</div>';
|
256 |
}
|
257 |
|
@@ -276,39 +291,41 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
276 |
* Show rtmedia addon update notice.
|
277 |
*
|
278 |
* @access public
|
|
|
279 |
* @param void
|
|
|
280 |
* @return bool $return_falg
|
281 |
*/
|
282 |
-
public function check_for_addon_update_notice()
|
283 |
$return_falg = false;
|
284 |
|
285 |
if ( defined( 'RTMEDIA_INSTAGRAM_PATH' ) ){
|
286 |
$plugin_info = get_plugin_data( RTMEDIA_INSTAGRAM_PATH . 'index.php' );
|
287 |
-
if ( isset( $plugin_info[
|
288 |
$return_falg = true;
|
289 |
}
|
290 |
} else {
|
291 |
if ( defined( 'RTMEDIA_PHOTO_TAGGING_PATH' ) ){
|
292 |
$plugin_info = get_plugin_data( RTMEDIA_PHOTO_TAGGING_PATH . 'index.php' );
|
293 |
-
if ( isset( $plugin_info[
|
294 |
$return_falg = true;
|
295 |
}
|
296 |
} else {
|
297 |
if ( defined( 'RTMEDIA_PRO_PATH' ) ){
|
298 |
$plugin_info = get_plugin_data( RTMEDIA_PRO_PATH . 'index.php' );
|
299 |
-
if ( isset( $plugin_info[
|
300 |
$return_falg = true;
|
301 |
}
|
302 |
} else {
|
303 |
if ( defined( 'RTMEDIA_FFMPEG_PATH' ) ){
|
304 |
$plugin_info = get_plugin_data( RTMEDIA_FFMPEG_PATH . 'index.php' );
|
305 |
-
if ( isset( $plugin_info[
|
306 |
$return_falg = true;
|
307 |
}
|
308 |
} else {
|
309 |
if ( defined( 'RTMEDIA_KALTURA_PATH' ) ){
|
310 |
$plugin_info = get_plugin_data( RTMEDIA_KALTURA_PATH . 'index.php' );
|
311 |
-
if ( isset( $plugin_info[
|
312 |
$return_falg = true;
|
313 |
}
|
314 |
}
|
@@ -324,10 +341,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
324 |
* Show buddypress admin tabs.
|
325 |
*
|
326 |
* @access public
|
|
|
327 |
* @param void
|
|
|
328 |
* @return void
|
329 |
*/
|
330 |
-
public function bp_admin_tabs()
|
331 |
if ( current_user_can( 'manage_options' ) ){
|
332 |
add_action( 'bp_admin_tabs', array( $this, 'tab' ) );
|
333 |
}
|
@@ -337,11 +356,13 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
337 |
* Show rtmedia advertisement.
|
338 |
*
|
339 |
* @access public
|
|
|
340 |
* @param void
|
|
|
341 |
* @return void
|
342 |
*/
|
343 |
-
public function rtmedia_advertisement()
|
344 |
-
$src = RTMEDIA_URL .
|
345 |
?>
|
346 |
<div class='rtmedia-admin-ad'>
|
347 |
<a href='http://rtcamp.com/store/rtmedia-pro/' target='_blank' title='rtMedia Pro'>
|
@@ -355,35 +376,38 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
355 |
* Create the function to output the contents of our Dashboard Widget
|
356 |
*
|
357 |
* @access public
|
|
|
358 |
* @param void
|
|
|
359 |
* @return void
|
360 |
*/
|
361 |
-
public function
|
362 |
?>
|
363 |
|
364 |
<div class="inside">
|
365 |
|
366 |
<div class="table table_content">
|
367 |
-
<p class="sub"><?php _e(
|
368 |
<table>
|
369 |
-
<tbody>
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
|
|
378 |
<tr>
|
379 |
<td class="b"> <?php echo $media->count; ?> </td>
|
380 |
<td class="t"><?php echo constant( strtoupper( 'RTMEDIA_' . $media->media_type . '_PLURAL_LABEL' ) ); ?></td>
|
381 |
</tr>
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
</tbody>
|
388 |
</table>
|
389 |
</div>
|
@@ -441,22 +465,24 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
441 |
* Create the function use in the action hook
|
442 |
*
|
443 |
* @access public
|
|
|
444 |
* @param void
|
|
|
445 |
* @return void
|
446 |
*/
|
447 |
-
public function add_dashboard_widgets()
|
448 |
-
wp_add_dashboard_widget( 'rtmedia_dashboard_widget', __( 'Right Now in rtMedia', 'rtmedia' ), array( &$this, '
|
449 |
global $wp_meta_boxes;
|
450 |
|
451 |
// Get the regular dashboard widgets array
|
452 |
// (which has our new widget already but at the end)
|
453 |
|
454 |
-
$normal_dashboard = $wp_meta_boxes[
|
455 |
|
456 |
// Backup and delete our new dashboard widget from the end of the array
|
457 |
|
458 |
-
$example_widget_backup = array( 'rtmedia_dashboard_widget' => $normal_dashboard[
|
459 |
-
unset
|
460 |
|
461 |
// Merge the two arrays together so our widget is at the beginning
|
462 |
|
@@ -464,17 +490,19 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
464 |
|
465 |
// Save the sorted array back into the original metaboxes
|
466 |
|
467 |
-
$wp_meta_boxes[
|
468 |
}
|
469 |
|
470 |
/**
|
471 |
* Add the plugin settings links
|
472 |
*
|
473 |
* @access public
|
|
|
474 |
* @param array $links
|
|
|
475 |
* @return array $links
|
476 |
*/
|
477 |
-
public function plugin_add_settings_link( $links )
|
478 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-settings' ) . '">Settings</a>';
|
479 |
array_push( $links, $settings_link );
|
480 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-support' ) . '">Support</a>';
|
@@ -487,15 +515,17 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
487 |
* Add the reencode link
|
488 |
*
|
489 |
* @access public
|
490 |
-
*
|
|
|
491 |
* @param object $post
|
|
|
492 |
* @return array $actions
|
493 |
*/
|
494 |
-
public function add_reencode_link( $actions, $post )
|
495 |
|
496 |
-
$mime_type_array = explode(
|
497 |
-
if ( is_array( $mime_type_array ) &&
|
498 |
-
$actions[
|
499 |
}
|
500 |
|
501 |
return $actions;
|
@@ -505,12 +535,14 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
505 |
* Do the bulk video/media handler.
|
506 |
*
|
507 |
* @access public
|
|
|
508 |
* @param void
|
|
|
509 |
* @return void
|
510 |
*/
|
511 |
-
public function bulk_action_handler()
|
512 |
-
if ( $_REQUEST[
|
513 |
-
wp_safe_redirect( add_query_arg( array(
|
514 |
exit;
|
515 |
}
|
516 |
}
|
@@ -519,61 +551,116 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
519 |
* Add admin bar menu
|
520 |
*
|
521 |
* @access public
|
|
|
522 |
* @param type $admin_bar
|
|
|
523 |
* @return void
|
524 |
*/
|
525 |
-
public function admin_bar_menu( $admin_bar )
|
526 |
if ( ! current_user_can( 'manage_options' ) ){
|
527 |
return;
|
528 |
}
|
529 |
|
530 |
$admin_bar->add_menu( array(
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
|
|
|
|
|
|
|
|
535 |
$admin_bar->add_menu( array(
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
$admin_bar->add_menu( array(
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
$admin_bar->add_menu( array(
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
$admin_bar->add_menu( array(
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
$admin_bar->add_menu( array(
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
$admin_bar->add_menu( array(
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
}
|
566 |
|
567 |
/**
|
568 |
* Generates the Admin UI.
|
569 |
*
|
570 |
* @access public
|
|
|
571 |
* @param string $hook
|
|
|
572 |
* @return void
|
573 |
*/
|
574 |
-
public function ui( $hook )
|
575 |
$admin_pages = array(
|
576 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
577 |
);
|
578 |
|
579 |
$admin_pages = apply_filters( 'rtmedia_filter_admin_pages_array', $admin_pages );
|
@@ -592,7 +679,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
592 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
593 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
594 |
|
595 |
-
if ( isset( $_REQUEST[
|
596 |
wp_enqueue_script( 'rtmedia-foundation-modernizr', RTMEDIA_URL . 'lib/foundation/custom.modernizr.js', array( 'jquery' ), RTMEDIA_VERSION );
|
597 |
wp_enqueue_script( 'rtmedia-foundation', RTMEDIA_BOWER_COMPONENTS_URL . 'js/foundation.js', array( 'jquery' ), RTMEDIA_VERSION );
|
598 |
//wp_enqueue_script ( 'rtmedia-foundation-section', RTMEDIA_URL . 'lib/foundation/foundation.section.js', array('jquery'), RTMEDIA_VERSION );
|
@@ -612,7 +699,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
612 |
wp_enqueue_style( 'rtmedia-main', RTMEDIA_URL . 'app/assets/css/main.css', '', RTMEDIA_VERSION );
|
613 |
wp_enqueue_style( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/css/admin.css', '', RTMEDIA_VERSION );
|
614 |
|
615 |
-
if ( isset( $_REQUEST[
|
616 |
wp_enqueue_style( 'foundation-admin-css', RTMEDIA_URL . 'app/assets/css/settings.css', '', RTMEDIA_VERSION );
|
617 |
}
|
618 |
|
@@ -628,11 +715,13 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
628 |
*
|
629 |
* @access public
|
630 |
* @global string 'rtmedia'
|
|
|
631 |
* @param void
|
|
|
632 |
* @return void
|
633 |
*/
|
634 |
-
public function menu()
|
635 |
-
add_menu_page( 'rtMedia', 'rtMedia', 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ), RTMEDIA_URL .
|
636 |
add_submenu_page( 'rtmedia-settings', __( 'Settings', 'rtmedia' ), __( 'Settings', 'rtmedia' ), 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ) );
|
637 |
add_submenu_page( 'rtmedia-settings', __( 'Addons', 'rtmedia' ), __( 'Addons', 'rtmedia' ), 'manage_options', 'rtmedia-addons', array( $this, 'addons_page' ) );
|
638 |
add_submenu_page( 'rtmedia-settings', __( 'Support', 'rtmedia' ), __( 'Support', 'rtmedia' ), 'manage_options', 'rtmedia-support', array( $this, 'support_page' ) );
|
@@ -640,7 +729,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
640 |
add_submenu_page( 'rtmedia-settings', __( 'Hire Us', 'rtmedia' ), __( 'Hire Us', 'rtmedia' ), 'manage_options', 'rtmedia-hire-us', array( $this, 'hire_us_page' ) );
|
641 |
add_submenu_page( 'rtmedia-settings', __( 'Licenses', 'rtmedia' ), __( 'Licenses', 'rtmedia' ), 'manage_options', 'rtmedia-license', array( $this, 'license_page' ) );
|
642 |
|
643 |
-
if ( ! defined(
|
644 |
add_submenu_page( 'rtmedia-settings', __( 'Premium', 'rtmedia' ), __( 'Premium ', 'rtmedia' ), 'manage_options', 'rtmedia-premium', array( $this, 'premium_page' ) );
|
645 |
}
|
646 |
|
@@ -660,44 +749,46 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
660 |
* Define regenerate thumbnail functionality.
|
661 |
*
|
662 |
* @access public
|
|
|
663 |
* @param void
|
|
|
664 |
* @return void
|
665 |
*/
|
666 |
-
public function rt_regenerate_thumbnail()
|
667 |
$prog = new rtProgress();
|
668 |
$done = 0;
|
669 |
?>
|
670 |
<div class="wrap">
|
671 |
<h2> rtMedia: <?php _e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?> </h2>
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
<script>
|
683 |
-
var rt_thumb_all_media = <?php echo json_encode($media_ids); ?>;
|
684 |
</script>
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
<br/>
|
689 |
-
<p>You can see this page because you have <a href="<?php echo admin_url('admin.php?page=rtmedia-addons') ?>">subscribed</a> for <a href="https://rtcamp.com/rtmedia/docs/admin/addons/audio-video-encoding/" target="_blank">rtMedia audio/video encoding service</a>.</p>
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
<?php } ?>
|
694 |
<div id="rt-migration-progress">
|
695 |
<br/> <br/>
|
696 |
<?php
|
697 |
$temp = $prog->progress( $done, $total );
|
698 |
$prog->progress_ui( $temp, true );
|
699 |
?>
|
700 |
-
<p> <?php _e( 'Total Videos', 'rtmedia' ) ?> : <span class='rt-total'><?php echo $total; ?></span
|
|
|
701 |
|
702 |
<p> <?php _e( 'Sent of regenerate thumbails', 'rtmedia' ) ?> : <span class='rt-done'>0</span></p>
|
703 |
|
@@ -711,7 +802,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
711 |
var db_total = <?php echo $total; ?>;
|
712 |
var indx = 0;
|
713 |
function db_start_regenrate() {
|
714 |
-
if ( indx < db_total ){
|
715 |
jQuery.ajax( {
|
716 |
url: rtmedia_admin_ajax,
|
717 |
type: 'post',
|
@@ -722,12 +813,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
722 |
success: function ( data ) {
|
723 |
data = JSON.parse( data );
|
724 |
|
725 |
-
if ( data.status == false ){
|
726 |
handle_regenrate_fail();
|
727 |
} else {
|
728 |
db_done++;
|
729 |
var progw = Math.ceil( (db_done / db_total) * 100 );
|
730 |
-
if ( progw > 100 ){
|
731 |
progw = 100;
|
732 |
}
|
733 |
jQuery( '#rtprogressbar>div' ).css( 'width', progw + '%' );
|
@@ -748,7 +839,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
748 |
jQuery( 'span.rt-fail' ).html( db_fail );
|
749 |
db_start_regenrate();
|
750 |
}
|
751 |
-
if ( jQuery( "#rt-start-media-regenerate" ).length > 0 ){
|
752 |
jQuery( "#rt-migration-progress" ).hide()
|
753 |
jQuery( "#rt-start-media-regenerate" ).click( function () {
|
754 |
jQuery( this ).hide();
|
@@ -769,23 +860,24 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
769 |
* Generate rtmedia thumbnail notice.
|
770 |
*
|
771 |
* @access public
|
|
|
772 |
* @param void
|
|
|
773 |
* @return void
|
774 |
*/
|
775 |
-
public function rtmedia_regenerate_thumbnail_notice()
|
776 |
$obj_encoding = new RTMediaEncoding( true );
|
777 |
if ( $obj_encoding->api_key ){
|
778 |
-
$site_option = rtmedia_get_site_option(
|
779 |
-
if ( ! $site_option ||
|
780 |
-
rtmedia_update_site_option(
|
781 |
$videos_without_thumbs = get_video_without_thumbs();
|
782 |
if ( isset( $videos_without_thumbs ) && is_array( $videos_without_thumbs ) && sizeof( $videos_without_thumbs ) > 0 ){
|
783 |
echo '<div class="error rtmedia-regenerate-video-thumb-error">
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
?>
|
790 |
<script type="text/javascript">
|
791 |
function rtmedia_hide_video_thumb_notice() {
|
@@ -807,14 +899,16 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
807 |
* Hide rtmedia video thumb admin notice.
|
808 |
*
|
809 |
* @access public
|
|
|
810 |
* @param void
|
|
|
811 |
* @return void
|
812 |
*/
|
813 |
-
public function rtmedia_hide_video_thumb_admin_notice()
|
814 |
-
if ( rtmedia_update_site_option(
|
815 |
-
echo
|
816 |
} else {
|
817 |
-
echo
|
818 |
}
|
819 |
die();
|
820 |
}
|
@@ -823,14 +917,16 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
823 |
* Hide rtmedia addon update notice.
|
824 |
*
|
825 |
* @access public
|
|
|
826 |
* @param void
|
|
|
827 |
* @return void
|
828 |
*/
|
829 |
-
public function rtmedia_hide_addon_update_notice()
|
830 |
-
if ( rtmedia_update_site_option(
|
831 |
-
echo
|
832 |
} else {
|
833 |
-
echo
|
834 |
}
|
835 |
die();
|
836 |
}
|
@@ -839,23 +935,25 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
839 |
* Define rt_media_regeneration.
|
840 |
*
|
841 |
* @access public
|
|
|
842 |
* @param void
|
|
|
843 |
* @return void
|
844 |
*/
|
845 |
-
public function rt_media_regeneration()
|
846 |
-
if ( isset( $_POST[
|
847 |
$model = new RTMediaModel();
|
848 |
-
$media = $model->get_media( array( 'media_id' => $_POST[
|
849 |
-
$media_type = $media[
|
850 |
$response = array();
|
851 |
-
if (
|
852 |
$objRTMediaEncoding = new RTMediaEncoding( true );
|
853 |
-
$autoformat =
|
854 |
-
$objRTMediaEncoding->reencoding( intval( $_POST[
|
855 |
-
$response[
|
856 |
} else {
|
857 |
-
$response[
|
858 |
-
$response[
|
859 |
}
|
860 |
echo json_encode( $response );
|
861 |
die();
|
@@ -867,10 +965,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
867 |
* Get video without thumbs.
|
868 |
*
|
869 |
* @access public
|
|
|
870 |
* @param void
|
|
|
871 |
* @return object $results
|
872 |
*/
|
873 |
-
public function get_video_without_thumbs()
|
874 |
$rtmedia_model = new RTMediaModel();
|
875 |
$sql = "select media_id from {$rtmedia_model->table_name} where media_type = 'video' and blog_id = '" . get_current_blog_id() . "' and cover_art is null";
|
876 |
global $wpdb;
|
@@ -883,10 +983,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
883 |
* Render the BuddyPress Media Settings page.
|
884 |
*
|
885 |
* @access public
|
|
|
886 |
* @param void
|
|
|
887 |
* @return void
|
888 |
*/
|
889 |
-
public function settings_page()
|
890 |
$this->render_page( 'rtmedia-settings', 'rtmedia' );
|
891 |
}
|
892 |
|
@@ -894,10 +996,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
894 |
* Render the BuddyPress Privacy Settings page.
|
895 |
*
|
896 |
* @access public
|
|
|
897 |
* @param void
|
|
|
898 |
* @return void
|
899 |
*/
|
900 |
-
public function privacy_page()
|
901 |
$this->render_page( 'rtmedia-privacy' );
|
902 |
}
|
903 |
|
@@ -905,10 +1009,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
905 |
* Render the rtmedia Importer Page.
|
906 |
*
|
907 |
* @access public
|
|
|
908 |
* @param void
|
|
|
909 |
* @return void
|
910 |
*/
|
911 |
-
public function rt_importer_page()
|
912 |
$this->render_page( 'rtmedia-importer' );
|
913 |
}
|
914 |
|
@@ -916,10 +1022,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
916 |
* Render the rtmedia convert videos page.
|
917 |
*
|
918 |
* @access public
|
|
|
919 |
* @param void
|
|
|
920 |
* @return void
|
921 |
*/
|
922 |
-
public function convert_videos_page()
|
923 |
$this->render_page( 'rtmedia-convert-videos' );
|
924 |
}
|
925 |
|
@@ -927,10 +1035,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
927 |
* Render the BuddyPress Media Addons page.
|
928 |
*
|
929 |
* @access public
|
|
|
930 |
* @param void
|
|
|
931 |
* @return void
|
932 |
*/
|
933 |
-
public function addons_page()
|
934 |
$this->render_page( 'rtmedia-addons' );
|
935 |
}
|
936 |
|
@@ -938,10 +1048,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
938 |
* Render the BuddyPress Media Support page.
|
939 |
*
|
940 |
* @access public
|
|
|
941 |
* @param void
|
|
|
942 |
* @return void
|
943 |
*/
|
944 |
-
public function support_page()
|
945 |
$this->render_page( 'rtmedia-support' );
|
946 |
}
|
947 |
|
@@ -949,10 +1061,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
949 |
* Render the rtmedia premium page.
|
950 |
*
|
951 |
* @access public
|
|
|
952 |
* @param void
|
|
|
953 |
* @return void
|
954 |
*/
|
955 |
-
public function premium_page()
|
956 |
$this->render_page( 'rtmedia-premium' );
|
957 |
}
|
958 |
|
@@ -960,10 +1074,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
960 |
* Render the rtmedia theme page.
|
961 |
*
|
962 |
* @access public
|
|
|
963 |
* @param void
|
|
|
964 |
* @return void
|
965 |
*/
|
966 |
-
public function theme_page()
|
967 |
$this->render_page( 'rtmedia-themes' );
|
968 |
}
|
969 |
|
@@ -971,14 +1087,16 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
971 |
* Render the rtmedia hire us page.
|
972 |
*
|
973 |
* @access public
|
|
|
974 |
* @param void
|
|
|
975 |
* @return void
|
976 |
*/
|
977 |
-
public function hire_us_page()
|
978 |
$this->render_page( 'rtmedia-hire-us' );
|
979 |
}
|
980 |
|
981 |
-
public function license_page()
|
982 |
$this->render_page( 'rtmedia-license' );
|
983 |
}
|
984 |
|
@@ -986,93 +1104,93 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
986 |
* Render the rtmedia hire us page.
|
987 |
*
|
988 |
* @access static
|
|
|
989 |
* @param void
|
|
|
990 |
* @return type
|
991 |
*/
|
992 |
-
static function get_current_tab()
|
993 |
-
return isset
|
994 |
}
|
995 |
|
996 |
/**
|
997 |
* Render BPMedia Settings.
|
998 |
*
|
999 |
* @access public
|
1000 |
-
* @global
|
|
|
1001 |
* @param type $page
|
1002 |
* @param type $option_group
|
|
|
1003 |
* @return void
|
1004 |
*/
|
1005 |
-
public function render_page( $page, $option_group = null )
|
1006 |
?>
|
1007 |
|
1008 |
<div class="wrap bp-media-admin <?php echo $this->get_current_tab(); ?>">
|
1009 |
<div id="icon-buddypress-media" class="icon32"><br></div>
|
1010 |
<div>
|
1011 |
<h2 class="nav-tab-wrapper"><?php $this->rtmedia_tabs(); ?>
|
1012 |
-
<span class="alignright by"
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
</h2>
|
1018 |
</div>
|
1019 |
|
1020 |
-
|
1021 |
-
<?php //settings_errors (); ?>
|
1022 |
<div class="row bp-media-settings-boxes-container">
|
1023 |
<div id="bp-media-settings-boxes" class="columns large-9">
|
1024 |
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
<form id="bp_media_settings_form" name="bp_media_settings_form" method="post"
|
1030 |
enctype="multipart/form-data">
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
<
|
1046 |
-
|
1047 |
-
<input type="submit" id="rtmedia-settings-submit"
|
1048 |
-
class="rtmedia-settings-submit button button-primary button-big"
|
1049 |
-
value="<?php _e( 'Save Settings', 'rtmedia' ); ?>">
|
1050 |
-
</div>
|
1051 |
</div>
|
|
|
1052 |
</form><?php
|
1053 |
-
|
1054 |
-
|
1055 |
<div class="bp-media-metabox-holder">
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
</div
|
1074 |
-
|
1075 |
-
|
|
|
1076 |
?>
|
1077 |
</div>
|
1078 |
<!-- .bp-media-settings-boxes -->
|
@@ -1089,11 +1207,13 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1089 |
*
|
1090 |
* @access public
|
1091 |
* @global type $bp_media
|
1092 |
-
*
|
1093 |
-
* @param
|
|
|
|
|
1094 |
* @return type $tabs_html
|
1095 |
*/
|
1096 |
-
public function tab()
|
1097 |
|
1098 |
$tabs_html = '';
|
1099 |
$idle_class = 'nav-tab';
|
@@ -1103,13 +1223,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1103 |
// Check to see which tab we are on
|
1104 |
$tab = $this->get_current_tab();
|
1105 |
/* rtMedia */
|
1106 |
-
$tabs[
|
1107 |
-
|
|
|
|
|
|
|
1108 |
);
|
1109 |
|
1110 |
-
|
1111 |
foreach ( $tabs as $tab ) {
|
1112 |
-
$tabs_html .= '<a id="bp-media" title= "' . $tab[
|
1113 |
}
|
1114 |
echo $tabs_html;
|
1115 |
}
|
@@ -1118,10 +1240,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1118 |
* Create core admin tabs.
|
1119 |
*
|
1120 |
* @access public
|
|
|
1121 |
* @param type $active_tab
|
|
|
1122 |
* @return void
|
1123 |
*/
|
1124 |
-
public function rtmedia_tabs( $active_tab = '' )
|
1125 |
// Declare local variables
|
1126 |
$tabs_html = '';
|
1127 |
$idle_class = 'nav-tab';
|
@@ -1130,17 +1254,29 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1130 |
// Setup core admin tabs
|
1131 |
$tabs = array(
|
1132 |
array(
|
1133 |
-
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-settings' ), 'admin.php' ) ),
|
|
|
|
|
1134 |
), array(
|
1135 |
-
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-addons' ), 'admin.php' ) ),
|
|
|
|
|
1136 |
), array(
|
1137 |
-
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-themes' ), 'admin.php' ) ),
|
|
|
|
|
1138 |
), array(
|
1139 |
-
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-hire-us' ), 'admin.php' ) ),
|
|
|
|
|
1140 |
), array(
|
1141 |
-
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ),
|
|
|
|
|
1142 |
), array(
|
1143 |
-
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-license' ), 'admin.php' ) ),
|
|
|
|
|
1144 |
),
|
1145 |
);
|
1146 |
|
@@ -1148,14 +1284,14 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1148 |
|
1149 |
// Loop through tabs and build navigation
|
1150 |
foreach ( array_values( $tabs ) as $tab_data ) {
|
1151 |
-
$is_current = (
|
1152 |
$tab_class = $is_current ? $active_class : $idle_class;
|
1153 |
|
1154 |
-
if ( isset( $tab_data[
|
1155 |
-
$tab_class .=
|
1156 |
}
|
1157 |
|
1158 |
-
$tabs_html .= '<a href="' . $tab_data[
|
1159 |
}
|
1160 |
|
1161 |
// Output the tabs
|
@@ -1169,32 +1305,33 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1169 |
* Create settings content tabs.
|
1170 |
*
|
1171 |
* @access public
|
|
|
1172 |
* @param type $page
|
|
|
1173 |
* @return void
|
1174 |
*/
|
1175 |
-
public function settings_content_tabs( $page )
|
1176 |
global $wp_settings_sections, $wp_settings_fields;
|
1177 |
|
1178 |
-
if ( ! isset
|
1179 |
return;
|
1180 |
}
|
1181 |
|
1182 |
-
foreach ( (
|
1183 |
-
if ( $section[
|
1184 |
echo "<h3>{$section['title']}</h3>\n";
|
1185 |
}
|
1186 |
|
1187 |
-
if ( $section[
|
1188 |
-
call_user_func( $section[
|
1189 |
}
|
1190 |
|
1191 |
-
if ( ! isset ( $wp_settings_fields ) || ! isset
|
1192 |
-
|| ! isset ( $wp_settings_fields[ $page ][ $section[ 'id' ] ] ) ){
|
1193 |
continue;
|
1194 |
}
|
1195 |
|
1196 |
echo '<table class="form-table">';
|
1197 |
-
do_settings_fields( $page, $section[
|
1198 |
echo '</table>';
|
1199 |
}
|
1200 |
}
|
@@ -1204,10 +1341,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1204 |
*
|
1205 |
* @access public
|
1206 |
* @global type $bp_media
|
1207 |
-
*
|
|
|
|
|
1208 |
* @return array $tabs
|
1209 |
*/
|
1210 |
-
public function settings_sub_tabs()
|
1211 |
$tabs_html = '';
|
1212 |
$tabs = array();
|
1213 |
|
@@ -1215,36 +1354,63 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1215 |
$tab = $this->get_current_tab();
|
1216 |
/* rtMedia */
|
1217 |
|
1218 |
-
$tabs[
|
1219 |
-
|
|
|
|
|
|
|
|
|
1220 |
);
|
1221 |
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
'
|
|
|
|
|
|
|
1226 |
);
|
1227 |
}
|
1228 |
|
1229 |
-
$tabs[
|
1230 |
-
|
|
|
|
|
|
|
|
|
1231 |
);
|
1232 |
|
1233 |
-
$tabs[
|
1234 |
-
|
|
|
|
|
|
|
|
|
1235 |
);
|
1236 |
|
1237 |
-
$tabs[
|
1238 |
-
|
|
|
|
|
|
|
|
|
1239 |
);
|
1240 |
-
$tabs[
|
1241 |
-
|
|
|
|
|
|
|
|
|
1242 |
);
|
1243 |
|
1244 |
$tabs = apply_filters( 'rtmedia_add_settings_sub_tabs', $tabs, $tab );
|
1245 |
|
1246 |
-
$tabs[
|
1247 |
-
|
|
|
|
|
|
|
|
|
1248 |
);
|
1249 |
|
1250 |
return $tabs;
|
@@ -1255,13 +1421,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1255 |
*
|
1256 |
* @access public
|
1257 |
* @global type $wpdb
|
1258 |
-
*
|
|
|
|
|
1259 |
* @return boolean
|
1260 |
*/
|
1261 |
-
public function update_count()
|
1262 |
global $wpdb;
|
1263 |
|
1264 |
-
$query
|
1265 |
p.post_author,pmp.meta_value,
|
1266 |
SUM(CASE WHEN post_mime_type LIKE 'image%' THEN 1 ELSE 0 END) as Images,
|
1267 |
SUM(CASE WHEN post_mime_type LIKE 'music%' THEN 1 ELSE 0 END) as Music,
|
@@ -1302,18 +1470,20 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1302 |
*
|
1303 |
* @access public
|
1304 |
* @global type $rtmedia_admin
|
1305 |
-
*
|
|
|
|
|
1306 |
* @return void
|
1307 |
*/
|
1308 |
-
public function save_multisite_options()
|
1309 |
global $rtmedia_admin;
|
1310 |
-
if ( isset
|
1311 |
$rtmedia_admin->update_count();
|
1312 |
}
|
1313 |
do_action( 'rtmedia_sanitize_settings', $_POST );
|
1314 |
|
1315 |
-
if ( isset
|
1316 |
-
rtmedia_update_site_option( 'rtmedia_options', $_POST[
|
1317 |
//
|
1318 |
// redirect to settings page in network
|
1319 |
wp_redirect( add_query_arg( array( 'page' => 'rtmedia-settings', 'updated' => 'true' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) );
|
@@ -1326,10 +1496,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1326 |
*
|
1327 |
* @access public
|
1328 |
* @global type $bp_media
|
1329 |
-
*
|
|
|
|
|
1330 |
* @return void
|
1331 |
*/
|
1332 |
-
public function admin_sidebar()
|
1333 |
do_action( 'rtmedia_before_default_admin_widgets' );
|
1334 |
$current_user = wp_get_current_user();
|
1335 |
// echo '<p><a target="_blank" href="http://rtcamp.com/news/buddypress-media-review-contest/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media"><img src="' . RTMEDIA_URL . 'app/assets/img/bpm-contest-banner.jpg" alt="BuddyPress Media Review Contest" /></a></p>';
|
@@ -1338,19 +1510,19 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1338 |
$setting_page_url = admin_url( 'admin.php?page=rtmedia-settings#rtmedia-general' );
|
1339 |
$message = sprintf( __( 'I use @buddypressmedia http://rt.cx/rtmedia on %s', 'rtmedia' ), home_url() );
|
1340 |
$addons = '<div id="social" class="">
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
//<li><a href="' . sprintf('%s', 'http://www.facebook.com/rtCamp.solutions/') . '" title="' . __('Become a fan on Facebook', 'rtmedia') . '" class="bp-media-facebook bp-media-social">' . __('Facebook', 'rtmedia') . '</a></li>
|
1352 |
//<li><a href="' . sprintf('%s', 'https://twitter.com/rtcamp/') . '" title="' . __('Follow us on Twitter', 'rtmedia') . '" class="bp-media-twitter bp-media-social">' . __('Twitter', 'rtmedia') . '</a></li> ;
|
1353 |
-
new RTMediaAdminWidget
|
1354 |
|
1355 |
// $donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
1356 |
// <!-- Identify your business so that you can collect the payments. -->
|
@@ -1385,15 +1557,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1385 |
<input type="submit" value="' . __( 'Subscribe', 'rtmedia' ) . '" name="subscribe" id="mc-embedded-subscribe" class="button">
|
1386 |
</div>
|
1387 |
</form>';
|
1388 |
-
new RTMediaAdminWidget
|
1389 |
|
1390 |
$news = '<img src ="' . admin_url( '/images/wpspin_light.gif' ) . '" /> Loading...';
|
1391 |
//new RTMediaAdminWidget ( 'latest-news', __( 'Latest News', 'rtmedia' ), $news );
|
1392 |
do_action( 'rtmedia_after_default_admin_widgets' );
|
1393 |
}
|
1394 |
|
1395 |
-
public function linkback()
|
1396 |
-
if ( isset
|
1397 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', true );
|
1398 |
} else {
|
1399 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', false );
|
@@ -1401,9 +1573,9 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1401 |
die;
|
1402 |
}
|
1403 |
|
1404 |
-
public function convert_videos_mailchimp_send()
|
1405 |
-
if ( $_POST[
|
1406 |
-
wp_remote_get( add_query_arg( array( 'rtmedia-convert-videos-form' => 1, 'choice' => $_POST[
|
1407 |
} else {
|
1408 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1409 |
}
|
@@ -1411,28 +1583,28 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1411 |
die;
|
1412 |
}
|
1413 |
|
1414 |
-
public function video_transcoding_survey_response()
|
1415 |
-
if ( isset
|
1416 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1417 |
}
|
1418 |
}
|
1419 |
|
1420 |
-
public function plugin_meta_premium_addon_link( $plugin_meta, $plugin_file, $plugin_data, $status )
|
1421 |
if ( plugin_basename( RTMEDIA_PATH . 'index.php' ) == $plugin_file ){
|
1422 |
-
$plugin_meta[
|
1423 |
}
|
1424 |
|
1425 |
return $plugin_meta;
|
1426 |
}
|
1427 |
|
1428 |
-
public function upload_filetypes_error()
|
1429 |
global $rtmedia;
|
1430 |
$upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1431 |
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1432 |
$flag = false;
|
1433 |
-
if ( isset
|
1434 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1435 |
-
if ( ! empty
|
1436 |
echo '<div class="error upload-filetype-network-settings-error">
|
1437 |
<p>
|
1438 |
' . sprintf( __( 'You have images enabled on rtMedia but your network allowed filetypes does not allow uploading of %s. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), implode( ', ', $not_supported_image ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
@@ -1442,7 +1614,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1442 |
$flag = true;
|
1443 |
}
|
1444 |
}
|
1445 |
-
if ( isset
|
1446 |
if ( ! in_array( 'mp4', $upload_filetypes ) ){
|
1447 |
echo '<div class="error upload-filetype-network-settings-error">
|
1448 |
<p>
|
@@ -1453,7 +1625,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1453 |
$flag = true;
|
1454 |
}
|
1455 |
}
|
1456 |
-
if ( isset
|
1457 |
if ( ! in_array( 'mp3', $upload_filetypes ) ){
|
1458 |
echo '<div class="error upload-filetype-network-settings-error"><p>' . sprintf( __( 'You have audio enabled on BuddyPress Media but your network allowed filetypes does not allow uploading of mp3. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1459 |
<br /><strong>' . __( 'Recommended', 'rtmedia' ) . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __( 'Update Network Settings Automatically', 'rtmedia' ) . '"> <img style="display:none;" src="' . admin_url( 'images/wpspin_light.gif' ) . '" />
|
@@ -1469,7 +1641,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1469 |
jQuery( '.update-network-settings-upload-filetypes' ).siblings( 'img' ).show();
|
1470 |
jQuery( '.update-network-settings-upload-filetypes' ).prop( 'disabled', true );
|
1471 |
jQuery.post( ajaxurl, {action: 'rtmedia_correct_upload_filetypes'}, function ( response ) {
|
1472 |
-
if ( response ){
|
1473 |
jQuery( '.upload-filetype-network-settings-error:first' ).after( '<div style="display: none;" class="updated rtmedia-network-settings-updated-successfully"><p><?php _e( 'Network settings updated successfully.', 'rtmedia' ); ?></p></div>' )
|
1474 |
jQuery( '.upload-filetype-network-settings-error' ).remove();
|
1475 |
jQuery( '.bp-media-network-settings-updated-successfully' ).show();
|
@@ -1477,17 +1649,17 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1477 |
} );
|
1478 |
} );
|
1479 |
</script>
|
1480 |
-
|
1481 |
}
|
1482 |
}
|
1483 |
|
1484 |
-
public function correct_upload_filetypes()
|
1485 |
global $rtmedia;
|
1486 |
$upload_filetypes_orig = $upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1487 |
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1488 |
-
if ( isset
|
1489 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1490 |
-
if ( ! empty
|
1491 |
$update_image_support = null;
|
1492 |
foreach ( $not_supported_image as $ns ) {
|
1493 |
$update_image_support .= ' ' . $ns;
|
@@ -1498,36 +1670,36 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1498 |
}
|
1499 |
}
|
1500 |
}
|
1501 |
-
if ( isset
|
1502 |
if ( ! in_array( 'mp4', $upload_filetypes ) ){
|
1503 |
$upload_filetypes_orig .= ' mp4';
|
1504 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1505 |
}
|
1506 |
}
|
1507 |
-
if ( isset
|
1508 |
if ( ! in_array( 'mp3', $upload_filetypes ) ){
|
1509 |
$upload_filetypes_orig .= ' mp3';
|
1510 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1511 |
}
|
1512 |
}
|
1513 |
echo true;
|
1514 |
-
die
|
1515 |
}
|
1516 |
|
1517 |
-
function edit_video_thumbnail( $form_fields, $post )
|
1518 |
if ( isset( $post->post_mime_type ) ){
|
1519 |
-
$media_type = explode(
|
1520 |
-
if ( is_array( $media_type ) && $media_type[
|
1521 |
$media_id = $post->ID;
|
1522 |
-
$thumbnail_array = get_post_meta( $media_id,
|
1523 |
$rtmedia_model = new RTMediaModel();
|
1524 |
-
$rtmedia_media = $rtmedia_model->get( array(
|
1525 |
-
$video_thumb_html =
|
1526 |
if ( is_array( $thumbnail_array ) ){
|
1527 |
$video_thumb_html .= '<ul> ';
|
1528 |
|
1529 |
foreach ( $thumbnail_array as $key => $thumbnail_src ) {
|
1530 |
-
$checked = checked( $thumbnail_src, $rtmedia_media[
|
1531 |
$count = $key + 1;
|
1532 |
$video_thumb_html .= '<li style="width: 150px;display: inline-block;">
|
1533 |
<label for="rtmedia-upload-select-thumbnail-' . $count . '">
|
@@ -1539,8 +1711,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1539 |
}
|
1540 |
|
1541 |
$video_thumb_html .= ' </ul>';
|
1542 |
-
$form_fields[
|
1543 |
-
'label' => 'Video Thumbnails', 'input' => 'html', 'html' => $video_thumb_html
|
1544 |
);
|
1545 |
}
|
1546 |
}
|
@@ -1549,37 +1721,37 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1549 |
return $form_fields;
|
1550 |
}
|
1551 |
|
1552 |
-
function save_video_thumbnail( $post, $attachment )
|
1553 |
-
if ( isset( $post[
|
1554 |
$rtmedia_model = new RTMediaModel();
|
1555 |
$model = new RTMediaModel();
|
1556 |
-
$media = $model->get( array(
|
1557 |
-
$media_id = $media[
|
1558 |
-
$rtmedia_model->update( array(
|
1559 |
update_activity_after_thumb_set( $media_id );
|
1560 |
}
|
1561 |
|
1562 |
return $post;
|
1563 |
}
|
1564 |
|
1565 |
-
function rtmedia_regenerate_thumb_js()
|
1566 |
global $pagenow;
|
1567 |
|
1568 |
-
if (
|
1569 |
?>
|
1570 |
<script type="text/javascript">
|
1571 |
function rtmedia_regenerate_thumbs( post_id ) {
|
1572 |
-
if ( post_id != "" ){
|
1573 |
var data = {
|
1574 |
action: 'rt_media_regeneration',
|
1575 |
media_id: post_id
|
1576 |
};
|
1577 |
jQuery.post( ajaxurl, data, function ( data ) {
|
1578 |
data = JSON.parse( data );
|
1579 |
-
if ( data.status === true ){
|
1580 |
-
alert( "<?php _e('Video is sent to generate thumbnails.', 'rtmedia') ?>" );
|
1581 |
} else {
|
1582 |
-
alert( "<?php _e('Video can\'t be sent to generate thumbnails.', 'rtmedia') ?>" );
|
1583 |
}
|
1584 |
} );
|
1585 |
}
|
@@ -1589,23 +1761,23 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1589 |
}
|
1590 |
}
|
1591 |
|
1592 |
-
function add_bulk_actions_regenerate()
|
1593 |
?>
|
1594 |
<script type="text/javascript">
|
1595 |
jQuery( document ).ready( function ( $ ) {
|
1596 |
-
$( 'select[name^="action"] option:last-child' ).before( '<option value="bulk_video_regenerate_thumbnails"><?php esc_attr_e( 'Regenerate Video Thumbnails', 'rtmedia'); ?></option>' );
|
1597 |
} );
|
1598 |
</script>
|
1599 |
<?php
|
1600 |
}
|
1601 |
|
1602 |
-
function presstrends_plugin()
|
1603 |
global $rtmedia;
|
1604 |
$option = $rtmedia->options;
|
1605 |
-
if ( ! isset( $option[
|
1606 |
return;
|
1607 |
}
|
1608 |
-
if ( $option[
|
1609 |
return;
|
1610 |
}
|
1611 |
// PressTrends Account API Key
|
@@ -1627,20 +1799,20 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1627 |
$theme_name = urlencode( $theme_data->Name );
|
1628 |
} else {
|
1629 |
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
|
1630 |
-
$theme_name = $theme_data[
|
1631 |
}
|
1632 |
|
1633 |
$plugin_name = '&';
|
1634 |
|
1635 |
foreach ( get_plugins() as $plugin_info ) {
|
1636 |
-
$plugin_name .= $plugin_info[
|
1637 |
}
|
1638 |
|
1639 |
// CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE
|
1640 |
$plugin_data = get_plugin_data( __FILE__ );
|
1641 |
$posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" );
|
1642 |
$data = array(
|
1643 |
-
'url' => base64_encode( site_url() ), 'posts' => $count_posts->publish, 'pages' => $count_pages->publish, 'comments' => $comments_count->total_comments, 'approved' => $comments_count->approved, 'spam' => $comments_count->spam, 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ), 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0, 'theme_version' => $plugin_data[
|
1644 |
);
|
1645 |
|
1646 |
foreach ( $data as $k => $v ) {
|
@@ -1652,11 +1824,11 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1652 |
}
|
1653 |
}
|
1654 |
|
1655 |
-
function rtmedia_update_template_notice()
|
1656 |
-
$site_option = rtmedia_get_site_option(
|
1657 |
|
1658 |
-
if ( ! $site_option ||
|
1659 |
-
rtmedia_update_site_option(
|
1660 |
if ( is_dir( get_template_directory() . '/rtmedia' ) ){
|
1661 |
echo '<div class="error rtmedia-update-template-notice"><p>' . __( 'Please update rtMedia template files if you have overridden the default rtMedia templates in your theme. If not, you can ignore and hide this notice.' ) . '<a href="#" onclick="rtmedia_hide_template_override_notice()" style="float:right">' . __( 'Hide', 'rtmedia' ) . '</a>' . ' </p></div>';
|
1662 |
?>
|
@@ -1665,7 +1837,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1665 |
var data = {action: 'rtmedia_hide_template_override_notice'};
|
1666 |
jQuery.post( ajaxurl, data, function ( response ) {
|
1667 |
response = response.trim();
|
1668 |
-
if (
|
1669 |
jQuery( '.rtmedia-update-template-notice' ).remove();
|
1670 |
} );
|
1671 |
}
|
@@ -1675,12 +1847,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1675 |
}
|
1676 |
}
|
1677 |
|
1678 |
-
function rtmedia_hide_template_override_notice()
|
1679 |
|
1680 |
-
if ( rtmedia_update_site_option(
|
1681 |
-
echo
|
1682 |
} else {
|
1683 |
-
echo
|
1684 |
}
|
1685 |
die();
|
1686 |
}
|
25 |
* @access public
|
26 |
* @return void
|
27 |
*/
|
28 |
+
public function __construct(){
|
29 |
global $rtmedia;
|
30 |
|
31 |
// Actions and filters
|
33 |
add_action( 'admin_init', array( $this, 'presstrends_plugin' ) );
|
34 |
|
35 |
//$rtmedia_feed = new RTMediaFeed();
|
36 |
+
add_filter( 'plugin_action_links_' . RTMEDIA_BASE_NAME, array( &$this, 'plugin_add_settings_link' ) );
|
37 |
//add_action ( 'wp_ajax_rtmedia_fetch_feed', array( $rtmedia_feed, 'fetch_feed' ), 1 );
|
38 |
$this->rtmedia_support = new RTMediaSupport();
|
39 |
add_action( 'wp_ajax_rtmedia_select_request', array( $this->rtmedia_support, 'get_form' ), 1 );
|
50 |
add_action( 'wp_ajax_rtmedia_correct_upload_filetypes', array( $this, 'correct_upload_filetypes' ), 1 );
|
51 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_meta_premium_addon_link' ), 1, 4 );
|
52 |
add_action( 'wp_dashboard_setup', array( &$this, 'add_dashboard_widgets' ), 0 );
|
53 |
+
add_filter( 'attachment_fields_to_edit', array( $this, 'edit_video_thumbnail' ), null, 2 );
|
54 |
+
add_filter( 'attachment_fields_to_save', array( $this, 'save_video_thumbnail' ), null, 2 );
|
55 |
add_action( 'wp_ajax_rtmedia_hide_video_thumb_admin_notice', array( $this, 'rtmedia_hide_video_thumb_admin_notice' ), 1 );
|
56 |
add_action( 'wp_ajax_rtmedia_hide_addon_update_notice', array( $this, 'rtmedia_hide_addon_update_notice' ), 1 );
|
57 |
|
58 |
$obj_encoding = new RTMediaEncoding( true );
|
59 |
|
60 |
if ( $obj_encoding->api_key ){
|
61 |
+
add_filter( 'media_row_actions', array( $this, 'add_reencode_link' ), null, 2 );
|
62 |
add_action( 'admin_head-upload.php', array( $this, 'add_bulk_actions_regenerate' ) );
|
63 |
add_action( 'admin_footer', array( $this, 'rtmedia_regenerate_thumb_js' ) );
|
64 |
add_action( 'admin_action_bulk_video_regenerate_thumbnails', array( $this, 'bulk_action_handler' ) );
|
71 |
$rtmedia->options = rtmedia_get_site_option( 'rtmedia-options' );
|
72 |
}
|
73 |
|
74 |
+
if ( isset( $_POST['rtmedia-options'] ) ){
|
75 |
+
if ( isset( $_POST['rtmedia-options']['general_showAdminMenu'] ) && '1' == $_POST['rtmedia-options']['general_showAdminMenu'] ){
|
76 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
77 |
}
|
78 |
} else {
|
79 |
+
if ( 1 == intval( $rtmedia->options['general_showAdminMenu'] ) ){
|
80 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
81 |
}
|
82 |
}
|
90 |
if ( is_multisite() ){
|
91 |
add_action( 'network_admin_edit_rtmedia', array( $this, 'save_multisite_options' ) );
|
92 |
}
|
|
|
93 |
}
|
94 |
|
95 |
$this->rtmedia_settings = new RTMediaSettings();
|
97 |
// show rtmedia advertisement
|
98 |
// if(! defined("RTMEDIA_PRO_VERSION") )
|
99 |
// add_action ( 'rtmedia_before_default_admin_widgets', array( $this, 'rtmedia_advertisement' ),1);
|
100 |
+
if ( ! class_exists( 'BuddyPress' ) ){
|
101 |
add_action( 'admin_init', array( $this, 'check_permalink_admin_notice' ) );
|
102 |
}
|
103 |
|
105 |
add_action( 'admin_init', array( $this, 'rtmedia_bp_add_update_type' ) );
|
106 |
add_action( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
|
107 |
$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
|
108 |
+
if ( class_exists( 'BuddyPress' ) ){
|
109 |
$rtmedia_activity_upgrade = new RTMediaActivityUpgrade();
|
110 |
}
|
111 |
add_action( 'admin_notices', array( $this, 'rtmedia_admin_notices' ) );
|
121 |
* Show rtmedia network admin notices.
|
122 |
*
|
123 |
* @access public
|
124 |
+
*
|
125 |
* @param void
|
126 |
+
*
|
127 |
* @return void
|
128 |
*/
|
129 |
+
public function rtmedia_network_admin_notices(){
|
130 |
if ( is_multisite() ){
|
131 |
$this->upload_filetypes_error();
|
132 |
}
|
136 |
* Show rtmedia admin notices.
|
137 |
*
|
138 |
* @access public
|
139 |
+
*
|
140 |
* @param void
|
141 |
+
*
|
142 |
* @return void
|
143 |
*/
|
144 |
+
public function rtmedia_admin_notices(){
|
145 |
$this->upload_filetypes_error();
|
146 |
$this->rtmedia_regenerate_thumbnail_notice();
|
147 |
$this->rtmedia_addon_update_notice();
|
153 |
* Show rtmedia inspirebook release notice.
|
154 |
*
|
155 |
* @access public
|
156 |
+
*
|
157 |
* @param void
|
158 |
+
*
|
159 |
* @return void
|
160 |
*/
|
161 |
+
public function rtmedia_inspirebook_release_notice(){
|
162 |
+
$site_option = rtmedia_get_site_option( 'rtmedia_inspirebook_release_notice' );
|
163 |
+
if ( ( ! $site_option || 'hide' != $site_option ) && ( 'inspirebook' != get_stylesheet() ) ){
|
164 |
+
rtmedia_update_site_option( 'rtmedia_inspirebook_release_notice', 'show' );
|
165 |
?>
|
166 |
<div class="updated rtmedia-inspire-book-notice">
|
167 |
<p>
|
188 |
* Hide rtmedia inspirebook release notice.
|
189 |
*
|
190 |
* @access public
|
191 |
+
*
|
192 |
* @param void
|
193 |
+
*
|
194 |
* @return void
|
195 |
*/
|
196 |
+
public function rtmedia_hide_inspirebook_release_notice(){
|
197 |
+
if ( rtmedia_update_site_option( 'rtmedia_inspirebook_release_notice', 'hide' ) ){
|
198 |
+
echo '1';
|
199 |
} else {
|
200 |
+
echo '0';
|
201 |
}
|
202 |
die();
|
203 |
}
|
206 |
* Set rtmedia buddypress update type.
|
207 |
*
|
208 |
* @access public
|
209 |
+
*
|
210 |
* @param void
|
211 |
+
*
|
212 |
* @return void
|
213 |
*/
|
214 |
+
public function rtmedia_bp_add_update_type(){
|
215 |
if ( class_exists( 'BuddyPress' ) && function_exists( 'bp_activity_set_action' ) ){
|
216 |
bp_activity_set_action( 'rtmedia_update', 'rtmedia_update', 'rtMedia Update' );
|
217 |
}
|
221 |
* Show rtmedia check permalink admin notice.
|
222 |
*
|
223 |
* @access public
|
224 |
+
*
|
225 |
* @param void
|
226 |
+
*
|
227 |
* @return void
|
228 |
*/
|
229 |
+
public function check_permalink_admin_notice(){
|
230 |
global $wp_rewrite;
|
231 |
if ( empty( $wp_rewrite->permalink_structure ) ){
|
232 |
add_action( 'admin_notices', array( $this, 'rtmedia_permalink_notice' ) );
|
237 |
* Define rtmedia permalink notice.
|
238 |
*
|
239 |
* @access public
|
240 |
+
*
|
241 |
* @param void
|
242 |
+
*
|
243 |
* @return void
|
244 |
*/
|
245 |
+
public function rtmedia_permalink_notice(){
|
246 |
echo '<div class="error rtmedia-permalink-change-notice">
|
247 |
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( ' You must ' ) . '<a href="' . admin_url( 'options-permalink.php' ) . '">' . __( 'update permalink structure' ) . '</a>' . __( ' to something other than the default for it to work.', 'rtmedia' ) . ' </p>
|
248 |
</div>';
|
252 |
* Define rtmedia addon update notice.
|
253 |
*
|
254 |
* @access public
|
255 |
+
*
|
256 |
* @param void
|
257 |
+
*
|
258 |
* @return void
|
259 |
*/
|
260 |
+
public function rtmedia_addon_update_notice(){
|
261 |
if ( ! $this->check_for_addon_update_notice() ){
|
262 |
return;
|
263 |
}
|
264 |
if ( is_rt_admin() ){
|
265 |
+
$site_option = rtmedia_get_site_option( 'rtmedia-addon-update-notice' );
|
266 |
+
if ( ! $site_option || 'hide' != $site_option ){
|
267 |
+
rtmedia_update_site_option( 'rtmedia-addon-update-notice', 'show' );
|
268 |
echo '<div class="error rtmedia-addon-upate-notice">
|
269 |
+
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( 'Please update all premium add-ons that you had purchased from rtCamp from your ', 'rtmedia' ) . ' <a href="https://rtcamp.com/my-account/" target="_blank">' . __( 'account', 'rtmedia' ) . '</a>. <a href="#" onclick="rtmedia_hide_addon_update_notice()" style="float:right">Hide</a> </p>
|
270 |
</div>';
|
271 |
}
|
272 |
|
291 |
* Show rtmedia addon update notice.
|
292 |
*
|
293 |
* @access public
|
294 |
+
*
|
295 |
* @param void
|
296 |
+
*
|
297 |
* @return bool $return_falg
|
298 |
*/
|
299 |
+
public function check_for_addon_update_notice(){
|
300 |
$return_falg = false;
|
301 |
|
302 |
if ( defined( 'RTMEDIA_INSTAGRAM_PATH' ) ){
|
303 |
$plugin_info = get_plugin_data( RTMEDIA_INSTAGRAM_PATH . 'index.php' );
|
304 |
+
if ( isset( $plugin_info['Version'] ) && $plugin_info['Version'] < '2.1.2' ){
|
305 |
$return_falg = true;
|
306 |
}
|
307 |
} else {
|
308 |
if ( defined( 'RTMEDIA_PHOTO_TAGGING_PATH' ) ){
|
309 |
$plugin_info = get_plugin_data( RTMEDIA_PHOTO_TAGGING_PATH . 'index.php' );
|
310 |
+
if ( isset( $plugin_info['Version'] ) && $plugin_info['Version'] < '2.2.1' ){
|
311 |
$return_falg = true;
|
312 |
}
|
313 |
} else {
|
314 |
if ( defined( 'RTMEDIA_PRO_PATH' ) ){
|
315 |
$plugin_info = get_plugin_data( RTMEDIA_PRO_PATH . 'index.php' );
|
316 |
+
if ( isset( $plugin_info['Version'] ) && $plugin_info['Version'] < '1.8.1' ){
|
317 |
$return_falg = true;
|
318 |
}
|
319 |
} else {
|
320 |
if ( defined( 'RTMEDIA_FFMPEG_PATH' ) ){
|
321 |
$plugin_info = get_plugin_data( RTMEDIA_FFMPEG_PATH . 'index.php' );
|
322 |
+
if ( isset( $plugin_info['Version'] ) && $plugin_info['Version'] < '2.1.1' ){
|
323 |
$return_falg = true;
|
324 |
}
|
325 |
} else {
|
326 |
if ( defined( 'RTMEDIA_KALTURA_PATH' ) ){
|
327 |
$plugin_info = get_plugin_data( RTMEDIA_KALTURA_PATH . 'index.php' );
|
328 |
+
if ( isset( $plugin_info['Version'] ) && $plugin_info['Version'] < '3.0.3' ){
|
329 |
$return_falg = true;
|
330 |
}
|
331 |
}
|
341 |
* Show buddypress admin tabs.
|
342 |
*
|
343 |
* @access public
|
344 |
+
*
|
345 |
* @param void
|
346 |
+
*
|
347 |
* @return void
|
348 |
*/
|
349 |
+
public function bp_admin_tabs(){
|
350 |
if ( current_user_can( 'manage_options' ) ){
|
351 |
add_action( 'bp_admin_tabs', array( $this, 'tab' ) );
|
352 |
}
|
356 |
* Show rtmedia advertisement.
|
357 |
*
|
358 |
* @access public
|
359 |
+
*
|
360 |
* @param void
|
361 |
+
*
|
362 |
* @return void
|
363 |
*/
|
364 |
+
public function rtmedia_advertisement(){
|
365 |
+
$src = RTMEDIA_URL . 'app/assets/img/rtMedia-pro-ad.png'
|
366 |
?>
|
367 |
<div class='rtmedia-admin-ad'>
|
368 |
<a href='http://rtcamp.com/store/rtmedia-pro/' target='_blank' title='rtMedia Pro'>
|
376 |
* Create the function to output the contents of our Dashboard Widget
|
377 |
*
|
378 |
* @access public
|
379 |
+
*
|
380 |
* @param void
|
381 |
+
*
|
382 |
* @return void
|
383 |
*/
|
384 |
+
public function rtmedia_dashboard_widget_function(){
|
385 |
?>
|
386 |
|
387 |
<div class="inside">
|
388 |
|
389 |
<div class="table table_content">
|
390 |
+
<p class="sub"><?php _e( 'Media Stats' ); ?></p>
|
391 |
<table>
|
392 |
+
<tbody>
|
393 |
+
<?php
|
394 |
+
$rtMedia_model = new RTMediaModel();
|
395 |
+
$sql = "select media_type, count(id) as count from {$rtMedia_model->table_name} where blog_id='" . get_current_blog_id() . "' group by media_type";
|
396 |
+
global $wpdb;
|
397 |
+
$results = $wpdb->get_results( $sql );
|
398 |
+
if ( $results ){
|
399 |
+
foreach ( $results as $media ) {
|
400 |
+
if ( defined( strtoupper( 'RTMEDIA_' . $media->media_type . '_PLURAL_LABEL' ) ) ){
|
401 |
+
?>
|
402 |
<tr>
|
403 |
<td class="b"> <?php echo $media->count; ?> </td>
|
404 |
<td class="t"><?php echo constant( strtoupper( 'RTMEDIA_' . $media->media_type . '_PLURAL_LABEL' ) ); ?></td>
|
405 |
</tr>
|
406 |
+
<?php
|
407 |
+
}
|
408 |
+
}
|
409 |
+
}
|
410 |
+
?>
|
411 |
</tbody>
|
412 |
</table>
|
413 |
</div>
|
465 |
* Create the function use in the action hook
|
466 |
*
|
467 |
* @access public
|
468 |
+
*
|
469 |
* @param void
|
470 |
+
*
|
471 |
* @return void
|
472 |
*/
|
473 |
+
public function add_dashboard_widgets(){
|
474 |
+
wp_add_dashboard_widget( 'rtmedia_dashboard_widget', __( 'Right Now in rtMedia', 'rtmedia' ), array( &$this, 'rtmedia_dashboard_widget_function' ) );
|
475 |
global $wp_meta_boxes;
|
476 |
|
477 |
// Get the regular dashboard widgets array
|
478 |
// (which has our new widget already but at the end)
|
479 |
|
480 |
+
$normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
|
481 |
|
482 |
// Backup and delete our new dashboard widget from the end of the array
|
483 |
|
484 |
+
$example_widget_backup = array( 'rtmedia_dashboard_widget' => $normal_dashboard['rtmedia_dashboard_widget'] );
|
485 |
+
unset( $normal_dashboard['rtmedia_dashboard_widget'] );
|
486 |
|
487 |
// Merge the two arrays together so our widget is at the beginning
|
488 |
|
490 |
|
491 |
// Save the sorted array back into the original metaboxes
|
492 |
|
493 |
+
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
|
494 |
}
|
495 |
|
496 |
/**
|
497 |
* Add the plugin settings links
|
498 |
*
|
499 |
* @access public
|
500 |
+
*
|
501 |
* @param array $links
|
502 |
+
*
|
503 |
* @return array $links
|
504 |
*/
|
505 |
+
public function plugin_add_settings_link( $links ){
|
506 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-settings' ) . '">Settings</a>';
|
507 |
array_push( $links, $settings_link );
|
508 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-support' ) . '">Support</a>';
|
515 |
* Add the reencode link
|
516 |
*
|
517 |
* @access public
|
518 |
+
*
|
519 |
+
* @param array $actions
|
520 |
* @param object $post
|
521 |
+
*
|
522 |
* @return array $actions
|
523 |
*/
|
524 |
+
public function add_reencode_link( $actions, $post ){
|
525 |
|
526 |
+
$mime_type_array = explode( '/', $post->post_mime_type );
|
527 |
+
if ( is_array( $mime_type_array ) && '' != $mime_type_array && 'video' == $mime_type_array[0] ){
|
528 |
+
$actions['reencode'] = '<a class="submitdelete" onclick="return rtmedia_regenerate_thumbs(' . $post->ID . ')" href="#">' . __( 'Regenerate Thumbnail', 'rtmedia' ) . '</a>';
|
529 |
}
|
530 |
|
531 |
return $actions;
|
535 |
* Do the bulk video/media handler.
|
536 |
*
|
537 |
* @access public
|
538 |
+
*
|
539 |
* @param void
|
540 |
+
*
|
541 |
* @return void
|
542 |
*/
|
543 |
+
public function bulk_action_handler(){
|
544 |
+
if ( 'bulk_video_regenerate_thumbnails' == $_REQUEST['action'] && '' != $_REQUEST['media'] ){
|
545 |
+
wp_safe_redirect( add_query_arg( array( 'media_ids' => urlencode( implode( ',', $_REQUEST['media'] ) ) ), admin_url( 'admin.php?page=rtmedia-regenerate' ) ) );
|
546 |
exit;
|
547 |
}
|
548 |
}
|
551 |
* Add admin bar menu
|
552 |
*
|
553 |
* @access public
|
554 |
+
*
|
555 |
* @param type $admin_bar
|
556 |
+
*
|
557 |
* @return void
|
558 |
*/
|
559 |
+
public function admin_bar_menu( $admin_bar ){
|
560 |
if ( ! current_user_can( 'manage_options' ) ){
|
561 |
return;
|
562 |
}
|
563 |
|
564 |
$admin_bar->add_menu( array(
|
565 |
+
'id' => 'rtMedia',
|
566 |
+
'title' => 'rtMedia',
|
567 |
+
'href' => admin_url( 'admin.php?page=rtmedia-settings' ),
|
568 |
+
'meta' => array(
|
569 |
+
'title' => __( 'rtMedia', 'rtmedia' ),
|
570 |
+
),
|
571 |
+
)
|
572 |
+
);
|
573 |
$admin_bar->add_menu( array(
|
574 |
+
'id' => 'rt-media-dashborad',
|
575 |
+
'parent' => 'rtMedia',
|
576 |
+
'title' => __( 'Settings', 'rtmedia' ),
|
577 |
+
'href' => admin_url( 'admin.php?page=rtmedia-settings' ),
|
578 |
+
'meta' => array(
|
579 |
+
'title' => __( 'Settings', 'rtmedia' ),
|
580 |
+
'target' => '_self',
|
581 |
+
),
|
582 |
+
)
|
583 |
+
);
|
584 |
$admin_bar->add_menu( array(
|
585 |
+
'id' => 'rt-media-addons',
|
586 |
+
'parent' => 'rtMedia',
|
587 |
+
'title' => __( 'Addons', 'rtmedia' ),
|
588 |
+
'href' => admin_url( 'admin.php?page=rtmedia-addons' ),
|
589 |
+
'meta' => array(
|
590 |
+
'title' => __( 'Addons', 'rtmedia' ),
|
591 |
+
'target' => '_self',
|
592 |
+
),
|
593 |
+
)
|
594 |
+
);
|
595 |
$admin_bar->add_menu( array(
|
596 |
+
'id' => 'rt-media-support',
|
597 |
+
'parent' => 'rtMedia',
|
598 |
+
'title' => __( 'Support', 'rtmedia' ),
|
599 |
+
'href' => admin_url( 'admin.php?page=rtmedia-support' ),
|
600 |
+
'meta' => array(
|
601 |
+
'title' => __( 'Support', 'rtmedia' ),
|
602 |
+
'target' => '_self',
|
603 |
+
),
|
604 |
+
)
|
605 |
+
);
|
606 |
$admin_bar->add_menu( array(
|
607 |
+
'id' => 'rt-media-themes',
|
608 |
+
'parent' => 'rtMedia',
|
609 |
+
'title' => __( 'Themes', 'rtmedia' ),
|
610 |
+
'href' => admin_url( 'admin.php?page=rtmedia-themes' ),
|
611 |
+
'meta' => array(
|
612 |
+
'title' => __( 'Themes', 'rtmedia' ),
|
613 |
+
'target' => '_self',
|
614 |
+
),
|
615 |
+
)
|
616 |
+
);
|
617 |
$admin_bar->add_menu( array(
|
618 |
+
'id' => 'rt-media-hire-us',
|
619 |
+
'parent' => 'rtMedia',
|
620 |
+
'title' => __( 'Hire Us', 'rtmedia' ),
|
621 |
+
'href' => admin_url( 'admin.php?page=rtmedia-hire-us' ),
|
622 |
+
'meta' => array(
|
623 |
+
'title' => __( 'Hire Us', 'rtmedia' ),
|
624 |
+
'target' => '_self',
|
625 |
+
),
|
626 |
+
)
|
627 |
+
);
|
628 |
$admin_bar->add_menu( array(
|
629 |
+
'id' => 'rt-media-license',
|
630 |
+
'parent' => 'rtMedia',
|
631 |
+
'title' => __( 'Licenses', 'rtmedia' ),
|
632 |
+
'href' => admin_url( 'admin.php?page=rtmedia-license' ),
|
633 |
+
'meta' => array(
|
634 |
+
'title' => __( 'Licenses', 'rtmedia' ),
|
635 |
+
'target' => '_self',
|
636 |
+
),
|
637 |
+
)
|
638 |
+
);
|
639 |
}
|
640 |
|
641 |
/**
|
642 |
* Generates the Admin UI.
|
643 |
*
|
644 |
* @access public
|
645 |
+
*
|
646 |
* @param string $hook
|
647 |
+
*
|
648 |
* @return void
|
649 |
*/
|
650 |
+
public function ui( $hook ){
|
651 |
$admin_pages = array(
|
652 |
+
'rtmedia_page_rtmedia-migration',
|
653 |
+
'rtmedia_page_rtmedia-kaltura-settings',
|
654 |
+
'rtmedia_page_rtmedia-ffmpeg-settings',
|
655 |
+
'toplevel_page_rtmedia-settings',
|
656 |
+
'rtmedia_page_rtmedia-addons',
|
657 |
+
'rtmedia_page_rtmedia-support',
|
658 |
+
'rtmedia_page_rtmedia-themes',
|
659 |
+
'rtmedia_page_rtmedia-hire-us',
|
660 |
+
'rtmedia_page_rtmedia-importer',
|
661 |
+
'rtmedia_page_rtmedia-regenerate',
|
662 |
+
'rtmedia_page_rtmedia-premium',
|
663 |
+
'rtmedia_page_rtmedia-license',
|
664 |
);
|
665 |
|
666 |
$admin_pages = apply_filters( 'rtmedia_filter_admin_pages_array', $admin_pages );
|
679 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
680 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
681 |
|
682 |
+
if ( isset( $_REQUEST['page'] ) && ( in_array( $_REQUEST['page'], array( 'rtmedia-settings', 'rtmedia-addons', 'rtmedia-themes', 'rtmedia-support', 'rtmedia-hire-us', 'rtmedia-license' ) ) ) ){
|
683 |
wp_enqueue_script( 'rtmedia-foundation-modernizr', RTMEDIA_URL . 'lib/foundation/custom.modernizr.js', array( 'jquery' ), RTMEDIA_VERSION );
|
684 |
wp_enqueue_script( 'rtmedia-foundation', RTMEDIA_BOWER_COMPONENTS_URL . 'js/foundation.js', array( 'jquery' ), RTMEDIA_VERSION );
|
685 |
//wp_enqueue_script ( 'rtmedia-foundation-section', RTMEDIA_URL . 'lib/foundation/foundation.section.js', array('jquery'), RTMEDIA_VERSION );
|
699 |
wp_enqueue_style( 'rtmedia-main', RTMEDIA_URL . 'app/assets/css/main.css', '', RTMEDIA_VERSION );
|
700 |
wp_enqueue_style( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/css/admin.css', '', RTMEDIA_VERSION );
|
701 |
|
702 |
+
if ( isset( $_REQUEST['page'] ) && ( in_array( $_REQUEST['page'], array( 'rtmedia-settings', 'rtmedia-addons', 'rtmedia-themes', 'rtmedia-support', 'rtmedia-hire-us', 'rtmedia-license' ) ) ) ){
|
703 |
wp_enqueue_style( 'foundation-admin-css', RTMEDIA_URL . 'app/assets/css/settings.css', '', RTMEDIA_VERSION );
|
704 |
}
|
705 |
|
715 |
*
|
716 |
* @access public
|
717 |
* @global string 'rtmedia'
|
718 |
+
*
|
719 |
* @param void
|
720 |
+
*
|
721 |
* @return void
|
722 |
*/
|
723 |
+
public function menu(){
|
724 |
+
add_menu_page( 'rtMedia', 'rtMedia', 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ), RTMEDIA_URL . 'app/assets/img/rtmedia-logo.png', '40.1111' );
|
725 |
add_submenu_page( 'rtmedia-settings', __( 'Settings', 'rtmedia' ), __( 'Settings', 'rtmedia' ), 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ) );
|
726 |
add_submenu_page( 'rtmedia-settings', __( 'Addons', 'rtmedia' ), __( 'Addons', 'rtmedia' ), 'manage_options', 'rtmedia-addons', array( $this, 'addons_page' ) );
|
727 |
add_submenu_page( 'rtmedia-settings', __( 'Support', 'rtmedia' ), __( 'Support', 'rtmedia' ), 'manage_options', 'rtmedia-support', array( $this, 'support_page' ) );
|
729 |
add_submenu_page( 'rtmedia-settings', __( 'Hire Us', 'rtmedia' ), __( 'Hire Us', 'rtmedia' ), 'manage_options', 'rtmedia-hire-us', array( $this, 'hire_us_page' ) );
|
730 |
add_submenu_page( 'rtmedia-settings', __( 'Licenses', 'rtmedia' ), __( 'Licenses', 'rtmedia' ), 'manage_options', 'rtmedia-license', array( $this, 'license_page' ) );
|
731 |
|
732 |
+
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ){
|
733 |
add_submenu_page( 'rtmedia-settings', __( 'Premium', 'rtmedia' ), __( 'Premium ', 'rtmedia' ), 'manage_options', 'rtmedia-premium', array( $this, 'premium_page' ) );
|
734 |
}
|
735 |
|
749 |
* Define regenerate thumbnail functionality.
|
750 |
*
|
751 |
* @access public
|
752 |
+
*
|
753 |
* @param void
|
754 |
+
*
|
755 |
* @return void
|
756 |
*/
|
757 |
+
public function rt_regenerate_thumbnail(){
|
758 |
$prog = new rtProgress();
|
759 |
$done = 0;
|
760 |
?>
|
761 |
<div class="wrap">
|
762 |
<h2> rtMedia: <?php _e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?> </h2>
|
763 |
+
<?php
|
764 |
+
if ( isset( $_REQUEST['media_ids'] ) && trim( $_REQUEST['media_ids'] ) != '' ){
|
765 |
+
$requested = false;
|
766 |
+
$media_ids = explode( ',', $_REQUEST['media_ids'] );
|
767 |
+
$total = count( $media_ids );
|
768 |
+
} else {
|
769 |
+
$media_ids = $this->get_video_without_thumbs();
|
770 |
+
$total = count( $media_ids );
|
771 |
+
}
|
772 |
+
?>
|
773 |
<script>
|
774 |
+
var rt_thumb_all_media = <?php echo json_encode( $media_ids ); ?>;
|
775 |
</script>
|
776 |
+
<?php
|
777 |
+
if ( ! isset( $requested ) ){
|
778 |
+
?>
|
779 |
<br/>
|
780 |
+
<p>You can see this page because you have <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ) ?>">subscribed</a> for <a href="https://rtcamp.com/rtmedia/docs/admin/addons/audio-video-encoding/" target="_blank">rtMedia audio/video encoding service</a>.</p> <p>You can regenerate thumbnails of specific video by visiting <a href="<?php echo admin_url( 'upload.php?post_mime_type=video' ); ?>">media page</a> and click on <b>Regenerate Thumbnail</b> option for that particular video.</p> <p>Press <b>Regenerate Pending Thumbnails</b> button to regenerate thumbnails of pending videos.</p> <p><input type="button" class="button button-primary" id="rt-start-media-regenerate" value="<?php echo __( 'Regenerate Pending Thumbnails', 'rtmedia' ) . ' (' . $total . ')'; ?>"/> </p>
|
781 |
+
<?php
|
782 |
+
}
|
783 |
+
?>
|
|
|
784 |
<div id="rt-migration-progress">
|
785 |
<br/> <br/>
|
786 |
<?php
|
787 |
$temp = $prog->progress( $done, $total );
|
788 |
$prog->progress_ui( $temp, true );
|
789 |
?>
|
790 |
+
<p> <?php _e( 'Total Videos', 'rtmedia' ) ?> : <span class='rt-total'><?php echo $total; ?></span>
|
791 |
+
</p>
|
792 |
|
793 |
<p> <?php _e( 'Sent of regenerate thumbails', 'rtmedia' ) ?> : <span class='rt-done'>0</span></p>
|
794 |
|
802 |
var db_total = <?php echo $total; ?>;
|
803 |
var indx = 0;
|
804 |
function db_start_regenrate() {
|
805 |
+
if ( indx < db_total ) {
|
806 |
jQuery.ajax( {
|
807 |
url: rtmedia_admin_ajax,
|
808 |
type: 'post',
|
813 |
success: function ( data ) {
|
814 |
data = JSON.parse( data );
|
815 |
|
816 |
+
if ( data.status == false ) {
|
817 |
handle_regenrate_fail();
|
818 |
} else {
|
819 |
db_done++;
|
820 |
var progw = Math.ceil( (db_done / db_total) * 100 );
|
821 |
+
if ( progw > 100 ) {
|
822 |
progw = 100;
|
823 |
}
|
824 |
jQuery( '#rtprogressbar>div' ).css( 'width', progw + '%' );
|
839 |
jQuery( 'span.rt-fail' ).html( db_fail );
|
840 |
db_start_regenrate();
|
841 |
}
|
842 |
+
if ( jQuery( "#rt-start-media-regenerate" ).length > 0 ) {
|
843 |
jQuery( "#rt-migration-progress" ).hide()
|
844 |
jQuery( "#rt-start-media-regenerate" ).click( function () {
|
845 |
jQuery( this ).hide();
|
860 |
* Generate rtmedia thumbnail notice.
|
861 |
*
|
862 |
* @access public
|
863 |
+
*
|
864 |
* @param void
|
865 |
+
*
|
866 |
* @return void
|
867 |
*/
|
868 |
+
public function rtmedia_regenerate_thumbnail_notice(){
|
869 |
$obj_encoding = new RTMediaEncoding( true );
|
870 |
if ( $obj_encoding->api_key ){
|
871 |
+
$site_option = rtmedia_get_site_option( 'rtmedia-video-thumb-notice' );
|
872 |
+
if ( ! $site_option || 'hide' != $site_option ){
|
873 |
+
rtmedia_update_site_option( 'rtmedia-video-thumb-notice', 'show' );
|
874 |
$videos_without_thumbs = get_video_without_thumbs();
|
875 |
if ( isset( $videos_without_thumbs ) && is_array( $videos_without_thumbs ) && sizeof( $videos_without_thumbs ) > 0 ){
|
876 |
echo '<div class="error rtmedia-regenerate-video-thumb-error">
|
877 |
+
<p>
|
878 |
+
' . sprintf( __( "You have total %s videos without thumbnails. Click <a href='%s'> here </a> to generate thumbnails. <a href='#' onclick='rtmedia_hide_video_thumb_notice()' style='float:right'>Hide</a>", 'rtmedia' ), sizeof( $videos_without_thumbs ), admin_url( 'admin.php?page=rtmedia-regenerate' ) ) . '
|
879 |
+
</p>
|
880 |
+
</div>';
|
|
|
881 |
?>
|
882 |
<script type="text/javascript">
|
883 |
function rtmedia_hide_video_thumb_notice() {
|
899 |
* Hide rtmedia video thumb admin notice.
|
900 |
*
|
901 |
* @access public
|
902 |
+
*
|
903 |
* @param void
|
904 |
+
*
|
905 |
* @return void
|
906 |
*/
|
907 |
+
public function rtmedia_hide_video_thumb_admin_notice(){
|
908 |
+
if ( rtmedia_update_site_option( 'rtmedia-video-thumb-notice', 'hide' ) ){
|
909 |
+
echo '1';
|
910 |
} else {
|
911 |
+
echo '0';
|
912 |
}
|
913 |
die();
|
914 |
}
|
917 |
* Hide rtmedia addon update notice.
|
918 |
*
|
919 |
* @access public
|
920 |
+
*
|
921 |
* @param void
|
922 |
+
*
|
923 |
* @return void
|
924 |
*/
|
925 |
+
public function rtmedia_hide_addon_update_notice(){
|
926 |
+
if ( rtmedia_update_site_option( 'rtmedia-addon-update-notice', 'hide' ) ){
|
927 |
+
echo '1';
|
928 |
} else {
|
929 |
+
echo '0';
|
930 |
}
|
931 |
die();
|
932 |
}
|
935 |
* Define rt_media_regeneration.
|
936 |
*
|
937 |
* @access public
|
938 |
+
*
|
939 |
* @param void
|
940 |
+
*
|
941 |
* @return void
|
942 |
*/
|
943 |
+
public function rt_media_regeneration(){
|
944 |
+
if ( isset( $_POST['media_id'] ) ){
|
945 |
$model = new RTMediaModel();
|
946 |
+
$media = $model->get_media( array( 'media_id' => $_POST['media_id'] ), 0, 1 );
|
947 |
+
$media_type = $media[0]->media_type;
|
948 |
$response = array();
|
949 |
+
if ( 'video' == $media_type ){
|
950 |
$objRTMediaEncoding = new RTMediaEncoding( true );
|
951 |
+
$autoformat = 'thumbnails';
|
952 |
+
$objRTMediaEncoding->reencoding( intval( $_POST['media_id'] ), $autoformat );
|
953 |
+
$response['status'] = true;
|
954 |
} else {
|
955 |
+
$response['status'] = false;
|
956 |
+
$response['message'] = __( 'not a video ...', 'rtmedia' );
|
957 |
}
|
958 |
echo json_encode( $response );
|
959 |
die();
|
965 |
* Get video without thumbs.
|
966 |
*
|
967 |
* @access public
|
968 |
+
*
|
969 |
* @param void
|
970 |
+
*
|
971 |
* @return object $results
|
972 |
*/
|
973 |
+
public function get_video_without_thumbs(){
|
974 |
$rtmedia_model = new RTMediaModel();
|
975 |
$sql = "select media_id from {$rtmedia_model->table_name} where media_type = 'video' and blog_id = '" . get_current_blog_id() . "' and cover_art is null";
|
976 |
global $wpdb;
|
983 |
* Render the BuddyPress Media Settings page.
|
984 |
*
|
985 |
* @access public
|
986 |
+
*
|
987 |
* @param void
|
988 |
+
*
|
989 |
* @return void
|
990 |
*/
|
991 |
+
public function settings_page(){
|
992 |
$this->render_page( 'rtmedia-settings', 'rtmedia' );
|
993 |
}
|
994 |
|
996 |
* Render the BuddyPress Privacy Settings page.
|
997 |
*
|
998 |
* @access public
|
999 |
+
*
|
1000 |
* @param void
|
1001 |
+
*
|
1002 |
* @return void
|
1003 |
*/
|
1004 |
+
public function privacy_page(){
|
1005 |
$this->render_page( 'rtmedia-privacy' );
|
1006 |
}
|
1007 |
|
1009 |
* Render the rtmedia Importer Page.
|
1010 |
*
|
1011 |
* @access public
|
1012 |
+
*
|
1013 |
* @param void
|
1014 |
+
*
|
1015 |
* @return void
|
1016 |
*/
|
1017 |
+
public function rt_importer_page(){
|
1018 |
$this->render_page( 'rtmedia-importer' );
|
1019 |
}
|
1020 |
|
1022 |
* Render the rtmedia convert videos page.
|
1023 |
*
|
1024 |
* @access public
|
1025 |
+
*
|
1026 |
* @param void
|
1027 |
+
*
|
1028 |
* @return void
|
1029 |
*/
|
1030 |
+
public function convert_videos_page(){
|
1031 |
$this->render_page( 'rtmedia-convert-videos' );
|
1032 |
}
|
1033 |
|
1035 |
* Render the BuddyPress Media Addons page.
|
1036 |
*
|
1037 |
* @access public
|
1038 |
+
*
|
1039 |
* @param void
|
1040 |
+
*
|
1041 |
* @return void
|
1042 |
*/
|
1043 |
+
public function addons_page(){
|
1044 |
$this->render_page( 'rtmedia-addons' );
|
1045 |
}
|
1046 |
|
1048 |
* Render the BuddyPress Media Support page.
|
1049 |
*
|
1050 |
* @access public
|
1051 |
+
*
|
1052 |
* @param void
|
1053 |
+
*
|
1054 |
* @return void
|
1055 |
*/
|
1056 |
+
public function support_page(){
|
1057 |
$this->render_page( 'rtmedia-support' );
|
1058 |
}
|
1059 |
|
1061 |
* Render the rtmedia premium page.
|
1062 |
*
|
1063 |
* @access public
|
1064 |
+
*
|
1065 |
* @param void
|
1066 |
+
*
|
1067 |
* @return void
|
1068 |
*/
|
1069 |
+
public function premium_page(){
|
1070 |
$this->render_page( 'rtmedia-premium' );
|
1071 |
}
|
1072 |
|
1074 |
* Render the rtmedia theme page.
|
1075 |
*
|
1076 |
* @access public
|
1077 |
+
*
|
1078 |
* @param void
|
1079 |
+
*
|
1080 |
* @return void
|
1081 |
*/
|
1082 |
+
public function theme_page(){
|
1083 |
$this->render_page( 'rtmedia-themes' );
|
1084 |
}
|
1085 |
|
1087 |
* Render the rtmedia hire us page.
|
1088 |
*
|
1089 |
* @access public
|
1090 |
+
*
|
1091 |
* @param void
|
1092 |
+
*
|
1093 |
* @return void
|
1094 |
*/
|
1095 |
+
public function hire_us_page(){
|
1096 |
$this->render_page( 'rtmedia-hire-us' );
|
1097 |
}
|
1098 |
|
1099 |
+
public function license_page(){
|
1100 |
$this->render_page( 'rtmedia-license' );
|
1101 |
}
|
1102 |
|
1104 |
* Render the rtmedia hire us page.
|
1105 |
*
|
1106 |
* @access static
|
1107 |
+
*
|
1108 |
* @param void
|
1109 |
+
*
|
1110 |
* @return type
|
1111 |
*/
|
1112 |
+
static function get_current_tab(){
|
1113 |
+
return isset( $_GET['page'] ) ? $_GET['page'] : 'rtmedia-settings';
|
1114 |
}
|
1115 |
|
1116 |
/**
|
1117 |
* Render BPMedia Settings.
|
1118 |
*
|
1119 |
* @access public
|
1120 |
+
* @global string 'rtmedia'
|
1121 |
+
*
|
1122 |
* @param type $page
|
1123 |
* @param type $option_group
|
1124 |
+
*
|
1125 |
* @return void
|
1126 |
*/
|
1127 |
+
public function render_page( $page, $option_group = null ){
|
1128 |
?>
|
1129 |
|
1130 |
<div class="wrap bp-media-admin <?php echo $this->get_current_tab(); ?>">
|
1131 |
<div id="icon-buddypress-media" class="icon32"><br></div>
|
1132 |
<div>
|
1133 |
<h2 class="nav-tab-wrapper"><?php $this->rtmedia_tabs(); ?>
|
1134 |
+
<span class="alignright by">
|
1135 |
+
<a class="rt-link" href="http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank" title="rtCamp : <?php _e( 'Empowering The Web With WordPress', 'rtmedia' ); ?>">
|
1136 |
+
<img src="<?php echo RTMEDIA_URL; ?>app/assets/img/rtcamp-logo.png">
|
1137 |
+
</a>
|
1138 |
+
</span>
|
1139 |
</h2>
|
1140 |
</div>
|
1141 |
|
|
|
|
|
1142 |
<div class="row bp-media-settings-boxes-container">
|
1143 |
<div id="bp-media-settings-boxes" class="columns large-9">
|
1144 |
|
1145 |
+
<?php
|
1146 |
+
$settings_url = ( is_multisite() ) ? network_admin_url( 'edit.php?action=' . $option_group ) : 'options.php';
|
1147 |
+
if ( $option_group ){ //$option_group if ($page == "bp-media-settings") action="<?php echo $settings_url;
|
1148 |
+
?>
|
1149 |
<form id="bp_media_settings_form" name="bp_media_settings_form" method="post"
|
1150 |
enctype="multipart/form-data">
|
1151 |
+
<div class="bp-media-metabox-holder">
|
1152 |
+
<?php
|
1153 |
+
settings_fields( $option_group );
|
1154 |
+
if ( 'rtmedia-settings' == $page ){
|
1155 |
+
echo '<div id="rtm-settings-tabs">';
|
1156 |
+
$sub_tabs = $this->settings_sub_tabs();
|
1157 |
+
RTMediaFormHandler::rtForm_settings_tabs_content( $page, $sub_tabs );
|
1158 |
+
echo '</div>';
|
1159 |
+
} else {
|
1160 |
+
do_settings_sections( $page );
|
1161 |
+
}
|
1162 |
+
?>
|
1163 |
+
<div class="clearfix"> </div>
|
1164 |
+
<div class="row">
|
1165 |
+
<input type="hidden" name="rtmedia-options-save" value="true">
|
1166 |
+
<input type="submit" id="rtmedia-settings-submit" class="rtmedia-settings-submit button button-primary button-big" value="<?php _e( 'Save Settings', 'rtmedia' ); ?>">
|
|
|
|
|
|
|
|
|
1167 |
</div>
|
1168 |
+
</div>
|
1169 |
</form><?php
|
1170 |
+
} else {
|
1171 |
+
?>
|
1172 |
<div class="bp-media-metabox-holder">
|
1173 |
+
<?php
|
1174 |
+
if ( 'rtmedia-addons' == $page ){
|
1175 |
+
RTMediaAddon::render_addons( $page );
|
1176 |
+
} else if ( 'rtmedia-support' == $page ){
|
1177 |
+
$rtmedia_support = new RTMediaSupport( false );
|
1178 |
+
$rtmedia_support->render_support( $page );
|
1179 |
+
} else if ( 'rtmedia-themes' == $page ){
|
1180 |
+
RTMediaThemes::render_themes( $page );
|
1181 |
+
} else {
|
1182 |
+
if ( 'rtmedia-license' == $page ){
|
1183 |
+
RTMediaLicense::render_themes( $page );
|
1184 |
+
} else {
|
1185 |
+
do_settings_sections( $page );
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
do_action( 'rtmedia_admin_page_insert', $page );
|
1189 |
+
?>
|
1190 |
+
</div>
|
1191 |
+
<?php
|
1192 |
+
do_action( 'rtmedia_admin_page_append', $page );
|
1193 |
+
}
|
1194 |
?>
|
1195 |
</div>
|
1196 |
<!-- .bp-media-settings-boxes -->
|
1207 |
*
|
1208 |
* @access public
|
1209 |
* @global type $bp_media
|
1210 |
+
*
|
1211 |
+
* @param void
|
1212 |
+
* @param void
|
1213 |
+
*
|
1214 |
* @return type $tabs_html
|
1215 |
*/
|
1216 |
+
public function tab(){
|
1217 |
|
1218 |
$tabs_html = '';
|
1219 |
$idle_class = 'nav-tab';
|
1223 |
// Check to see which tab we are on
|
1224 |
$tab = $this->get_current_tab();
|
1225 |
/* rtMedia */
|
1226 |
+
$tabs[] = array(
|
1227 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-settings' ), 'admin.php' ) ),
|
1228 |
+
'title' => __( 'rtMedia', 'rtmedia' ),
|
1229 |
+
'name' => __( 'rtMedia', 'rtmedia' ),
|
1230 |
+
'class' => ( $tab == 'rtmedia-settings' || $tab == 'rtmedia-addons' || $tab == 'rtmedia-support' || $tab == 'rtmedia-importer' ) ? $active_class : $idle_class,
|
1231 |
);
|
1232 |
|
|
|
1233 |
foreach ( $tabs as $tab ) {
|
1234 |
+
$tabs_html .= '<a id="bp-media" title= "' . $tab['title'] . '" href="' . $tab['href'] . '" class="' . $tab['class'] . '">' . $tab['name'] . '</a>';
|
1235 |
}
|
1236 |
echo $tabs_html;
|
1237 |
}
|
1240 |
* Create core admin tabs.
|
1241 |
*
|
1242 |
* @access public
|
1243 |
+
*
|
1244 |
* @param type $active_tab
|
1245 |
+
*
|
1246 |
* @return void
|
1247 |
*/
|
1248 |
+
public function rtmedia_tabs( $active_tab = '' ){
|
1249 |
// Declare local variables
|
1250 |
$tabs_html = '';
|
1251 |
$idle_class = 'nav-tab';
|
1254 |
// Setup core admin tabs
|
1255 |
$tabs = array(
|
1256 |
array(
|
1257 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-settings' ), 'admin.php' ) ),
|
1258 |
+
'name' => __( 'Settings', 'rtmedia' ),
|
1259 |
+
'slug' => 'rtmedia-settings',
|
1260 |
), array(
|
1261 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-addons' ), 'admin.php' ) ),
|
1262 |
+
'name' => __( 'Addons', 'rtmedia' ),
|
1263 |
+
'slug' => 'rtmedia-addons',
|
1264 |
), array(
|
1265 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-themes' ), 'admin.php' ) ),
|
1266 |
+
'name' => __( 'Themes', 'rtmedia' ),
|
1267 |
+
'slug' => 'rtmedia-themes',
|
1268 |
), array(
|
1269 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-hire-us' ), 'admin.php' ) ),
|
1270 |
+
'name' => __( 'Hire Us', 'rtmedia' ),
|
1271 |
+
'slug' => 'rtmedia-hire-us',
|
1272 |
), array(
|
1273 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ),
|
1274 |
+
'name' => __( 'Support', 'rtmedia' ),
|
1275 |
+
'slug' => 'rtmedia-support',
|
1276 |
), array(
|
1277 |
+
'href' => get_admin_url( null, add_query_arg( array( 'page' => 'rtmedia-license' ), 'admin.php' ) ),
|
1278 |
+
'name' => __( 'Licenses', 'rtmedia' ),
|
1279 |
+
'slug' => 'rtmedia-license',
|
1280 |
),
|
1281 |
);
|
1282 |
|
1284 |
|
1285 |
// Loop through tabs and build navigation
|
1286 |
foreach ( array_values( $tabs ) as $tab_data ) {
|
1287 |
+
$is_current = (bool) ( $tab_data['slug'] == $this->get_current_tab() );
|
1288 |
$tab_class = $is_current ? $active_class : $idle_class;
|
1289 |
|
1290 |
+
if ( isset( $tab_data['class'] ) && is_array( $tab_data['class'] ) ){
|
1291 |
+
$tab_class .= ' ' . implode( ' ', $tab_data['class'] );
|
1292 |
}
|
1293 |
|
1294 |
+
$tabs_html .= '<a href="' . $tab_data['href'] . '" class="' . $tab_class . '">' . $tab_data['name'] . '</a>';
|
1295 |
}
|
1296 |
|
1297 |
// Output the tabs
|
1305 |
* Create settings content tabs.
|
1306 |
*
|
1307 |
* @access public
|
1308 |
+
*
|
1309 |
* @param type $page
|
1310 |
+
*
|
1311 |
* @return void
|
1312 |
*/
|
1313 |
+
public function settings_content_tabs( $page ){
|
1314 |
global $wp_settings_sections, $wp_settings_fields;
|
1315 |
|
1316 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
1317 |
return;
|
1318 |
}
|
1319 |
|
1320 |
+
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
1321 |
+
if ( $section['title'] ){
|
1322 |
echo "<h3>{$section['title']}</h3>\n";
|
1323 |
}
|
1324 |
|
1325 |
+
if ( $section['callback'] ){
|
1326 |
+
call_user_func( $section['callback'], $section );
|
1327 |
}
|
1328 |
|
1329 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
|
|
1330 |
continue;
|
1331 |
}
|
1332 |
|
1333 |
echo '<table class="form-table">';
|
1334 |
+
do_settings_fields( $page, $section['id'] );
|
1335 |
echo '</table>';
|
1336 |
}
|
1337 |
}
|
1341 |
*
|
1342 |
* @access public
|
1343 |
* @global type $bp_media
|
1344 |
+
*
|
1345 |
+
* @param void
|
1346 |
+
*
|
1347 |
* @return array $tabs
|
1348 |
*/
|
1349 |
+
public function settings_sub_tabs(){
|
1350 |
$tabs_html = '';
|
1351 |
$tabs = array();
|
1352 |
|
1354 |
$tab = $this->get_current_tab();
|
1355 |
/* rtMedia */
|
1356 |
|
1357 |
+
$tabs[7] = array(
|
1358 |
+
'href' => '#rtmedia-display',
|
1359 |
+
'icon' => 'rtmicon-desktop',
|
1360 |
+
'title' => __( 'Display', 'rtmedia' ),
|
1361 |
+
'name' => __( 'Display', 'rtmedia' ),
|
1362 |
+
'callback' => array( 'RTMediaFormHandler', 'display_content' )
|
1363 |
);
|
1364 |
|
1365 |
+
if ( class_exists( 'BuddyPress' ) ){
|
1366 |
+
$tabs[20] = array(
|
1367 |
+
'href' => '#rtmedia-bp',
|
1368 |
+
'icon' => 'rtmicon-group',
|
1369 |
+
'title' => __( 'rtMedia BuddyPress', 'rtmedia' ),
|
1370 |
+
'name' => __( 'BuddyPress', 'rtmedia' ),
|
1371 |
+
'callback' => array( 'RTMediaFormHandler', 'buddypress_content' ) //change it to BuddyPress Content
|
1372 |
);
|
1373 |
}
|
1374 |
|
1375 |
+
$tabs[30] = array(
|
1376 |
+
'href' => '#rtmedia-types',
|
1377 |
+
'icon' => 'rtmicon-film',
|
1378 |
+
'title' => __( 'rtMedia Types', 'rtmedia' ),
|
1379 |
+
'name' => __( 'Types', 'rtmedia' ),
|
1380 |
+
'callback' => array( 'RTMediaFormHandler', 'types_content' )
|
1381 |
);
|
1382 |
|
1383 |
+
$tabs[40] = array(
|
1384 |
+
'href' => '#rtmedia-sizes',
|
1385 |
+
'icon' => 'rtmicon-expand',
|
1386 |
+
'title' => __( 'rtMedia Sizes', 'rtmedia' ),
|
1387 |
+
'name' => __( 'Image Sizes', 'rtmedia' ),
|
1388 |
+
'callback' => array( 'RTMediaFormHandler', 'sizes_content' )
|
1389 |
);
|
1390 |
|
1391 |
+
$tabs[50] = array(
|
1392 |
+
'href' => '#rtmedia-privacy',
|
1393 |
+
'icon' => 'rtmicon-lock',
|
1394 |
+
'title' => __( 'rtMedia Privacy', 'rtmedia' ),
|
1395 |
+
'name' => __( 'Privacy', 'rtmedia' ),
|
1396 |
+
'callback' => array( 'RTMediaFormHandler', 'privacy_content' )
|
1397 |
);
|
1398 |
+
$tabs[60] = array(
|
1399 |
+
'href' => '#rtmedia-custom-css-settings',
|
1400 |
+
'icon' => 'rtmicon-css3',
|
1401 |
+
'title' => __( 'rtMedia Custom CSS', 'rtmedia' ),
|
1402 |
+
'name' => __( 'Custom CSS', 'rtmedia' ),
|
1403 |
+
'callback' => array( 'RTMediaFormHandler', 'custom_css_content' )
|
1404 |
);
|
1405 |
|
1406 |
$tabs = apply_filters( 'rtmedia_add_settings_sub_tabs', $tabs, $tab );
|
1407 |
|
1408 |
+
$tabs[] = array(
|
1409 |
+
'href' => '#rtmedia-general',
|
1410 |
+
'icon' => 'rtmicon-wrench',
|
1411 |
+
'title' => __( 'Other Settings', 'rtmedia' ),
|
1412 |
+
'name' => __( 'Other Settings', 'rtmedia' ),
|
1413 |
+
'callback' => array( 'RTMediaFormHandler', 'general_content' )
|
1414 |
);
|
1415 |
|
1416 |
return $tabs;
|
1421 |
*
|
1422 |
* @access public
|
1423 |
* @global type $wpdb
|
1424 |
+
*
|
1425 |
+
* @param void
|
1426 |
+
*
|
1427 |
* @return boolean
|
1428 |
*/
|
1429 |
+
public function update_count(){
|
1430 |
global $wpdb;
|
1431 |
|
1432 |
+
$query = "SELECT
|
1433 |
p.post_author,pmp.meta_value,
|
1434 |
SUM(CASE WHEN post_mime_type LIKE 'image%' THEN 1 ELSE 0 END) as Images,
|
1435 |
SUM(CASE WHEN post_mime_type LIKE 'music%' THEN 1 ELSE 0 END) as Music,
|
1470 |
*
|
1471 |
* @access public
|
1472 |
* @global type $rtmedia_admin
|
1473 |
+
*
|
1474 |
+
* @param void
|
1475 |
+
*
|
1476 |
* @return void
|
1477 |
*/
|
1478 |
+
public function save_multisite_options(){
|
1479 |
global $rtmedia_admin;
|
1480 |
+
if ( isset( $_POST['refresh-count'] ) ){
|
1481 |
$rtmedia_admin->update_count();
|
1482 |
}
|
1483 |
do_action( 'rtmedia_sanitize_settings', $_POST );
|
1484 |
|
1485 |
+
if ( isset( $_POST['rtmedia_options'] ) ){
|
1486 |
+
rtmedia_update_site_option( 'rtmedia_options', $_POST['rtmedia_options'] );
|
1487 |
//
|
1488 |
// redirect to settings page in network
|
1489 |
wp_redirect( add_query_arg( array( 'page' => 'rtmedia-settings', 'updated' => 'true' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) );
|
1496 |
*
|
1497 |
* @access public
|
1498 |
* @global type $bp_media
|
1499 |
+
*
|
1500 |
+
* @param void
|
1501 |
+
*
|
1502 |
* @return void
|
1503 |
*/
|
1504 |
+
public function admin_sidebar(){
|
1505 |
do_action( 'rtmedia_before_default_admin_widgets' );
|
1506 |
$current_user = wp_get_current_user();
|
1507 |
// echo '<p><a target="_blank" href="http://rtcamp.com/news/buddypress-media-review-contest/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media"><img src="' . RTMEDIA_URL . 'app/assets/img/bpm-contest-banner.jpg" alt="BuddyPress Media Review Contest" /></a></p>';
|
1510 |
$setting_page_url = admin_url( 'admin.php?page=rtmedia-settings#rtmedia-general' );
|
1511 |
$message = sprintf( __( 'I use @buddypressmedia http://rt.cx/rtmedia on %s', 'rtmedia' ), home_url() );
|
1512 |
$addons = '<div id="social" class="">
|
1513 |
+
<div class="row">
|
1514 |
+
<div class="columns large-11">
|
1515 |
+
<p><a href="http://twitter.com/home/?status=' . $message . '" class="button" target= "_blank" title="' . __( 'Post to Twitter Now', 'rtmedia' ) . '">' . __( 'Post to Twitter', 'rtmedia' ) . '</a></p>
|
1516 |
+
<p><a href="https://www.facebook.com/sharer/sharer.php?u=http://rtcamp.com/rtmedia/" class="button" target="_blank" title="' . __( 'Share on Facebook Now', 'rtmedia' ) . '">' . __( 'Share on Facebook', 'rtmedia' ) . '</a></p>
|
1517 |
+
<p><a href="http://wordpress.org/support/view/plugin-reviews/buddypress-media?rate=5#postform" class="button" target= "_blank" title="' . __( 'Rate rtMedia on Wordpress.org', 'rtmedia' ) . '">' . __( 'Rate on Wordpress.org', 'rtmedia' ) . '</a></p>
|
1518 |
+
<p><a href="' . sprintf( '%s', 'https://rtcamp.com/feed/' ) . '" title="' . __( 'Subscribe to our feeds', 'rtmedia' ) . '" class="button" target="_blank" title="' . __( 'Subscribe to our Feeds', 'rtmedia' ) . '">' . __( 'Subscribe to our Feeds', 'rtmedia' ) . '</a></p>
|
1519 |
+
<p><a href="' . $setting_page_url . '" title="' . __( 'Add link to footer', 'rtmedia' ) . '" class="button" title="' . __( 'Add link to footer', 'rtmedia' ) . '">' . __( 'Add link to footer', 'rtmedia' ) . '</a></p>
|
1520 |
+
</div>
|
1521 |
+
</div>
|
1522 |
+
</div>';
|
1523 |
//<li><a href="' . sprintf('%s', 'http://www.facebook.com/rtCamp.solutions/') . '" title="' . __('Become a fan on Facebook', 'rtmedia') . '" class="bp-media-facebook bp-media-social">' . __('Facebook', 'rtmedia') . '</a></li>
|
1524 |
//<li><a href="' . sprintf('%s', 'https://twitter.com/rtcamp/') . '" title="' . __('Follow us on Twitter', 'rtmedia') . '" class="bp-media-twitter bp-media-social">' . __('Twitter', 'rtmedia') . '</a></li> ;
|
1525 |
+
new RTMediaAdminWidget( 'spread-the-word', __( 'Spread the Word', 'rtmedia' ), $addons );
|
1526 |
|
1527 |
// $donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
1528 |
// <!-- Identify your business so that you can collect the payments. -->
|
1557 |
<input type="submit" value="' . __( 'Subscribe', 'rtmedia' ) . '" name="subscribe" id="mc-embedded-subscribe" class="button">
|
1558 |
</div>
|
1559 |
</form>';
|
1560 |
+
new RTMediaAdminWidget( 'branding', __( 'Subscribe', 'rtmedia' ), $branding );
|
1561 |
|
1562 |
$news = '<img src ="' . admin_url( '/images/wpspin_light.gif' ) . '" /> Loading...';
|
1563 |
//new RTMediaAdminWidget ( 'latest-news', __( 'Latest News', 'rtmedia' ), $news );
|
1564 |
do_action( 'rtmedia_after_default_admin_widgets' );
|
1565 |
}
|
1566 |
|
1567 |
+
public function linkback(){
|
1568 |
+
if ( isset( $_POST['linkback'] ) && $_POST['linkback'] ){
|
1569 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', true );
|
1570 |
} else {
|
1571 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', false );
|
1573 |
die;
|
1574 |
}
|
1575 |
|
1576 |
+
public function convert_videos_mailchimp_send(){
|
1577 |
+
if ( 'Yes' == $_POST['interested'] && ! empty( $_POST['choice'] ) ){
|
1578 |
+
wp_remote_get( add_query_arg( array( 'rtmedia-convert-videos-form' => 1, 'choice' => $_POST['choice'], 'url' => urlencode( $_POST['url'] ), 'email' => $_POST['email'] ), 'http://rtcamp.com/' ) );
|
1579 |
} else {
|
1580 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1581 |
}
|
1583 |
die;
|
1584 |
}
|
1585 |
|
1586 |
+
public function video_transcoding_survey_response(){
|
1587 |
+
if ( isset( $_GET['survey-done'] ) && ( $_GET['survey-done'] == md5( 'survey-done' ) ) ){
|
1588 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1589 |
}
|
1590 |
}
|
1591 |
|
1592 |
+
public function plugin_meta_premium_addon_link( $plugin_meta, $plugin_file, $plugin_data, $status ){
|
1593 |
if ( plugin_basename( RTMEDIA_PATH . 'index.php' ) == $plugin_file ){
|
1594 |
+
$plugin_meta[] = '<a href="https://rtcamp.com/store/product-category/buddypress/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" title="' . __( 'Premium Add-ons', 'rtmedia' ) . '">' . __( 'Premium Add-ons', 'rtmedia' ) . '</a>';
|
1595 |
}
|
1596 |
|
1597 |
return $plugin_meta;
|
1598 |
}
|
1599 |
|
1600 |
+
public function upload_filetypes_error(){
|
1601 |
global $rtmedia;
|
1602 |
$upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1603 |
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1604 |
$flag = false;
|
1605 |
+
if ( isset( $rtmedia->options['images_enabled'] ) && $rtmedia->options['images_enabled'] ){
|
1606 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1607 |
+
if ( ! empty( $not_supported_image ) ){
|
1608 |
echo '<div class="error upload-filetype-network-settings-error">
|
1609 |
<p>
|
1610 |
' . sprintf( __( 'You have images enabled on rtMedia but your network allowed filetypes does not allow uploading of %s. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), implode( ', ', $not_supported_image ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1614 |
$flag = true;
|
1615 |
}
|
1616 |
}
|
1617 |
+
if ( isset( $rtmedia->options['videos_enabled'] ) && $rtmedia->options['videos_enabled'] ){
|
1618 |
if ( ! in_array( 'mp4', $upload_filetypes ) ){
|
1619 |
echo '<div class="error upload-filetype-network-settings-error">
|
1620 |
<p>
|
1625 |
$flag = true;
|
1626 |
}
|
1627 |
}
|
1628 |
+
if ( isset( $rtmedia->options['audio_enabled'] ) && $rtmedia->options['audio_enabled'] ){
|
1629 |
if ( ! in_array( 'mp3', $upload_filetypes ) ){
|
1630 |
echo '<div class="error upload-filetype-network-settings-error"><p>' . sprintf( __( 'You have audio enabled on BuddyPress Media but your network allowed filetypes does not allow uploading of mp3. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1631 |
<br /><strong>' . __( 'Recommended', 'rtmedia' ) . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __( 'Update Network Settings Automatically', 'rtmedia' ) . '"> <img style="display:none;" src="' . admin_url( 'images/wpspin_light.gif' ) . '" />
|
1641 |
jQuery( '.update-network-settings-upload-filetypes' ).siblings( 'img' ).show();
|
1642 |
jQuery( '.update-network-settings-upload-filetypes' ).prop( 'disabled', true );
|
1643 |
jQuery.post( ajaxurl, {action: 'rtmedia_correct_upload_filetypes'}, function ( response ) {
|
1644 |
+
if ( response ) {
|
1645 |
jQuery( '.upload-filetype-network-settings-error:first' ).after( '<div style="display: none;" class="updated rtmedia-network-settings-updated-successfully"><p><?php _e( 'Network settings updated successfully.', 'rtmedia' ); ?></p></div>' )
|
1646 |
jQuery( '.upload-filetype-network-settings-error' ).remove();
|
1647 |
jQuery( '.bp-media-network-settings-updated-successfully' ).show();
|
1649 |
} );
|
1650 |
} );
|
1651 |
</script>
|
1652 |
+
<?php
|
1653 |
}
|
1654 |
}
|
1655 |
|
1656 |
+
public function correct_upload_filetypes(){
|
1657 |
global $rtmedia;
|
1658 |
$upload_filetypes_orig = $upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1659 |
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1660 |
+
if ( isset( $rtmedia->options['images_enabled'] ) && $rtmedia->options['images_enabled'] ){
|
1661 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1662 |
+
if ( ! empty( $not_supported_image ) ){
|
1663 |
$update_image_support = null;
|
1664 |
foreach ( $not_supported_image as $ns ) {
|
1665 |
$update_image_support .= ' ' . $ns;
|
1670 |
}
|
1671 |
}
|
1672 |
}
|
1673 |
+
if ( isset( $rtmedia->options['videos_enabled'] ) && $rtmedia->options['videos_enabled'] ){
|
1674 |
if ( ! in_array( 'mp4', $upload_filetypes ) ){
|
1675 |
$upload_filetypes_orig .= ' mp4';
|
1676 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1677 |
}
|
1678 |
}
|
1679 |
+
if ( isset( $rtmedia->options['audio_enabled'] ) && $rtmedia->options['audio_enabled'] ){
|
1680 |
if ( ! in_array( 'mp3', $upload_filetypes ) ){
|
1681 |
$upload_filetypes_orig .= ' mp3';
|
1682 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1683 |
}
|
1684 |
}
|
1685 |
echo true;
|
1686 |
+
die();
|
1687 |
}
|
1688 |
|
1689 |
+
function edit_video_thumbnail( $form_fields, $post ){
|
1690 |
if ( isset( $post->post_mime_type ) ){
|
1691 |
+
$media_type = explode( '/', $post->post_mime_type );
|
1692 |
+
if ( is_array( $media_type ) && 'video' == $media_type[0] ){
|
1693 |
$media_id = $post->ID;
|
1694 |
+
$thumbnail_array = get_post_meta( $media_id, 'rtmedia_media_thumbnails', true );
|
1695 |
$rtmedia_model = new RTMediaModel();
|
1696 |
+
$rtmedia_media = $rtmedia_model->get( array( 'media_id' => $media_id ) );
|
1697 |
+
$video_thumb_html = '';
|
1698 |
if ( is_array( $thumbnail_array ) ){
|
1699 |
$video_thumb_html .= '<ul> ';
|
1700 |
|
1701 |
foreach ( $thumbnail_array as $key => $thumbnail_src ) {
|
1702 |
+
$checked = checked( $thumbnail_src, $rtmedia_media[0]->cover_art, false );
|
1703 |
$count = $key + 1;
|
1704 |
$video_thumb_html .= '<li style="width: 150px;display: inline-block;">
|
1705 |
<label for="rtmedia-upload-select-thumbnail-' . $count . '">
|
1711 |
}
|
1712 |
|
1713 |
$video_thumb_html .= ' </ul>';
|
1714 |
+
$form_fields['rtmedia_video_thumbnail'] = array(
|
1715 |
+
'label' => 'Video Thumbnails', 'input' => 'html', 'html' => $video_thumb_html,
|
1716 |
);
|
1717 |
}
|
1718 |
}
|
1721 |
return $form_fields;
|
1722 |
}
|
1723 |
|
1724 |
+
function save_video_thumbnail( $post, $attachment ){
|
1725 |
+
if ( isset( $post['rtmedia-thumbnail'] ) ){
|
1726 |
$rtmedia_model = new RTMediaModel();
|
1727 |
$model = new RTMediaModel();
|
1728 |
+
$media = $model->get( array( 'media_id' => $post['ID'] ) );
|
1729 |
+
$media_id = $media[0]->id;
|
1730 |
+
$rtmedia_model->update( array( 'cover_art' => $post['rtmedia-thumbnail'] ), array( 'media_id' => $post['ID'] ) );
|
1731 |
update_activity_after_thumb_set( $media_id );
|
1732 |
}
|
1733 |
|
1734 |
return $post;
|
1735 |
}
|
1736 |
|
1737 |
+
function rtmedia_regenerate_thumb_js(){
|
1738 |
global $pagenow;
|
1739 |
|
1740 |
+
if ( 'upload.php' == $pagenow ){
|
1741 |
?>
|
1742 |
<script type="text/javascript">
|
1743 |
function rtmedia_regenerate_thumbs( post_id ) {
|
1744 |
+
if ( post_id != "" ) {
|
1745 |
var data = {
|
1746 |
action: 'rt_media_regeneration',
|
1747 |
media_id: post_id
|
1748 |
};
|
1749 |
jQuery.post( ajaxurl, data, function ( data ) {
|
1750 |
data = JSON.parse( data );
|
1751 |
+
if ( data.status === true ) {
|
1752 |
+
alert( "<?php _e( 'Video is sent to generate thumbnails.', 'rtmedia' ) ?>" );
|
1753 |
} else {
|
1754 |
+
alert( "<?php _e( 'Video can\'t be sent to generate thumbnails.', 'rtmedia' ) ?>" );
|
1755 |
}
|
1756 |
} );
|
1757 |
}
|
1761 |
}
|
1762 |
}
|
1763 |
|
1764 |
+
function add_bulk_actions_regenerate(){
|
1765 |
?>
|
1766 |
<script type="text/javascript">
|
1767 |
jQuery( document ).ready( function ( $ ) {
|
1768 |
+
$( 'select[name^="action"] option:last-child' ).before( '<option value="bulk_video_regenerate_thumbnails"><?php esc_attr_e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?></option>' );
|
1769 |
} );
|
1770 |
</script>
|
1771 |
<?php
|
1772 |
}
|
1773 |
|
1774 |
+
function presstrends_plugin(){
|
1775 |
global $rtmedia;
|
1776 |
$option = $rtmedia->options;
|
1777 |
+
if ( ! isset( $option['general_AllowUserData'] ) ){
|
1778 |
return;
|
1779 |
}
|
1780 |
+
if ( '0' == $option['general_AllowUserData'] ){
|
1781 |
return;
|
1782 |
}
|
1783 |
// PressTrends Account API Key
|
1799 |
$theme_name = urlencode( $theme_data->Name );
|
1800 |
} else {
|
1801 |
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
|
1802 |
+
$theme_name = $theme_data['Name'];
|
1803 |
}
|
1804 |
|
1805 |
$plugin_name = '&';
|
1806 |
|
1807 |
foreach ( get_plugins() as $plugin_info ) {
|
1808 |
+
$plugin_name .= $plugin_info['Name'] . '&';
|
1809 |
}
|
1810 |
|
1811 |
// CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE
|
1812 |
$plugin_data = get_plugin_data( __FILE__ );
|
1813 |
$posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" );
|
1814 |
$data = array(
|
1815 |
+
'url' => base64_encode( site_url() ), 'posts' => $count_posts->publish, 'pages' => $count_pages->publish, 'comments' => $comments_count->total_comments, 'approved' => $comments_count->approved, 'spam' => $comments_count->spam, 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ), 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0, 'theme_version' => $plugin_data['Version'], 'theme_name' => $theme_name, 'site_name' => str_replace( ' ', '', get_bloginfo( 'name' ) ), 'plugins' => count( get_option( 'active_plugins' ) ), 'plugin' => urlencode( $plugin_name ), 'wpversion' => get_bloginfo( 'version' ),
|
1816 |
);
|
1817 |
|
1818 |
foreach ( $data as $k => $v ) {
|
1824 |
}
|
1825 |
}
|
1826 |
|
1827 |
+
function rtmedia_update_template_notice(){
|
1828 |
+
$site_option = rtmedia_get_site_option( 'rtmedia-update-template-notice-v3_7_3' );
|
1829 |
|
1830 |
+
if ( ! $site_option || 'hide' != $site_option ){
|
1831 |
+
rtmedia_update_site_option( 'rtmedia-update-template-notice-v3_7_3', 'show' );
|
1832 |
if ( is_dir( get_template_directory() . '/rtmedia' ) ){
|
1833 |
echo '<div class="error rtmedia-update-template-notice"><p>' . __( 'Please update rtMedia template files if you have overridden the default rtMedia templates in your theme. If not, you can ignore and hide this notice.' ) . '<a href="#" onclick="rtmedia_hide_template_override_notice()" style="float:right">' . __( 'Hide', 'rtmedia' ) . '</a>' . ' </p></div>';
|
1834 |
?>
|
1837 |
var data = {action: 'rtmedia_hide_template_override_notice'};
|
1838 |
jQuery.post( ajaxurl, data, function ( response ) {
|
1839 |
response = response.trim();
|
1840 |
+
if ( '1' === response )
|
1841 |
jQuery( '.rtmedia-update-template-notice' ).remove();
|
1842 |
} );
|
1843 |
}
|
1847 |
}
|
1848 |
}
|
1849 |
|
1850 |
+
function rtmedia_hide_template_override_notice(){
|
1851 |
|
1852 |
+
if ( rtmedia_update_site_option( 'rtmedia-update-template-notice-v3_7_3', 'hide' ) ){
|
1853 |
+
echo '1';
|
1854 |
} else {
|
1855 |
+
echo '0';
|
1856 |
}
|
1857 |
die();
|
1858 |
}
|
app/admin/RTMediaFormHandler.php
CHANGED
@@ -12,17 +12,17 @@
|
|
12 |
*/
|
13 |
class RTMediaFormHandler {
|
14 |
|
15 |
-
public static function selectBox( $args )
|
16 |
-
|
17 |
-
$options
|
18 |
$defaults = array(
|
19 |
'key' => '',
|
20 |
'desc' => '',
|
21 |
-
'default'
|
22 |
'show_desc' => false,
|
23 |
-
'selects' => array()
|
24 |
);
|
25 |
-
$args
|
26 |
extract( $args );
|
27 |
|
28 |
if ( ! empty( $key ) ){
|
@@ -33,7 +33,7 @@ class RTMediaFormHandler {
|
|
33 |
foreach ( $selects as $value => $key ) {
|
34 |
$args['rtForm_options'][] = array(
|
35 |
$key => $value,
|
36 |
-
'selected' => ( $default == $value ) ? true : false
|
37 |
);
|
38 |
}
|
39 |
|
@@ -45,24 +45,27 @@ class RTMediaFormHandler {
|
|
45 |
* Show rtmedia textarea in admin options.
|
46 |
*
|
47 |
* @access static
|
48 |
-
*
|
49 |
-
* @param
|
|
|
|
|
50 |
* @return string $chkObj->get_textarea( $args )
|
51 |
*/
|
52 |
-
public static function textarea( $args, $echo = true )
|
53 |
-
|
54 |
-
$options
|
55 |
$defaults = array(
|
56 |
-
|
57 |
'key' => '',
|
58 |
'desc' => '',
|
59 |
-
'show_desc' => false
|
60 |
);
|
61 |
-
$args
|
62 |
extract( $args );
|
63 |
|
64 |
if ( ! isset( $value ) ){
|
65 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
|
|
66 |
return;
|
67 |
}
|
68 |
|
@@ -74,34 +77,37 @@ class RTMediaFormHandler {
|
|
74 |
|
75 |
$chkObj = new rtForm();
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
* Show rtmedia checkbox in admin options.
|
86 |
*
|
87 |
* @access static
|
88 |
-
*
|
89 |
-
* @param
|
|
|
|
|
90 |
* @return string $chkObj->get_switch( $args )
|
91 |
*/
|
92 |
-
public static function checkbox( $args, $echo = true )
|
93 |
global $rtmedia;
|
94 |
-
$options
|
95 |
$defaults = array(
|
96 |
'key' => '',
|
97 |
'desc' => '',
|
98 |
-
'show_desc' => false
|
99 |
);
|
100 |
-
$args
|
101 |
extract( $args );
|
102 |
|
103 |
if ( ! isset( $value ) ){
|
104 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
|
|
105 |
return;
|
106 |
}
|
107 |
|
@@ -112,36 +118,39 @@ class RTMediaFormHandler {
|
|
112 |
$args['rtForm_options'] = array( array( '' => 1, 'checked' => $value ) );
|
113 |
|
114 |
$chkObj = new rtForm();
|
115 |
-
// echo $chkObj->get_checkbox($args);
|
116 |
-
|
117 |
-
|
118 |
} else {
|
119 |
-
|
120 |
}
|
121 |
-
// echo $chkObj->get_switch_square($args);
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
* Show rtmedia radio in admin options.
|
126 |
*
|
127 |
* @access static
|
128 |
-
*
|
|
|
|
|
129 |
* @return void
|
130 |
*/
|
131 |
-
public static function radio( $args )
|
132 |
global $rtmedia;
|
133 |
-
|
134 |
$defaults = array(
|
135 |
'key' => '',
|
136 |
'radios' => array(),
|
137 |
'default' => '',
|
138 |
-
'show_desc' => false
|
139 |
);
|
140 |
-
$args
|
141 |
extract( $args );
|
142 |
|
143 |
if ( 2 > count( $radios ) ){
|
144 |
trigger_error( __( 'Need to specify atleast to radios else use a checkbox instead', 'rtmedia' ) );
|
|
|
145 |
return;
|
146 |
}
|
147 |
|
@@ -153,7 +162,7 @@ class RTMediaFormHandler {
|
|
153 |
foreach ( $radios as $value => $key ) {
|
154 |
$args['rtForm_options'][] = array(
|
155 |
$key => $value,
|
156 |
-
'checked' => ( $default == $value ) ? true : false
|
157 |
);
|
158 |
}
|
159 |
|
@@ -167,7 +176,7 @@ class RTMediaFormHandler {
|
|
167 |
* @access static
|
168 |
* @return void
|
169 |
*/
|
170 |
-
public static function dimensions( $args )
|
171 |
$dmnObj = new rtDimensions();
|
172 |
echo $dmnObj->get_dimensions( $args );
|
173 |
}
|
@@ -176,21 +185,24 @@ class RTMediaFormHandler {
|
|
176 |
* Show rtmedia number in admin options.
|
177 |
*
|
178 |
* @access static
|
179 |
-
*
|
|
|
|
|
180 |
* @return void
|
181 |
*/
|
182 |
-
public static function number( $args )
|
183 |
global $rtmedia;
|
184 |
-
$options
|
185 |
$defaults = array(
|
186 |
'key' => '',
|
187 |
-
'desc' => ''
|
188 |
);
|
189 |
-
$args
|
190 |
extract( $args );
|
191 |
|
192 |
if ( ! isset( $value ) ){
|
193 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
|
|
194 |
return;
|
195 |
}
|
196 |
|
@@ -208,21 +220,24 @@ class RTMediaFormHandler {
|
|
208 |
* Show rtmedia textbox in admin options.
|
209 |
*
|
210 |
* @access static
|
211 |
-
*
|
|
|
|
|
212 |
* @return void
|
213 |
*/
|
214 |
-
public static function textbox( $args )
|
215 |
global $rtmedia;
|
216 |
-
$options
|
217 |
$defaults = array(
|
218 |
'key' => '',
|
219 |
-
'desc' => ''
|
220 |
);
|
221 |
-
$args
|
222 |
extract( $args );
|
223 |
|
224 |
if ( ! isset( $value ) ){
|
225 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
|
|
226 |
return;
|
227 |
}
|
228 |
|
@@ -240,15 +255,19 @@ class RTMediaFormHandler {
|
|
240 |
* extract settings.
|
241 |
*
|
242 |
* @access static
|
|
|
243 |
* @param array $options
|
244 |
* @param string $section_name
|
|
|
245 |
* @return array $section
|
246 |
*/
|
247 |
-
static function extract_settings( $section_name, $options )
|
248 |
$section = array();
|
249 |
foreach ( $options as $key => $value ) {
|
250 |
-
|
251 |
-
|
|
|
|
|
252 |
}
|
253 |
|
254 |
return $section;
|
@@ -258,69 +277,70 @@ class RTMediaFormHandler {
|
|
258 |
* display render options.
|
259 |
*
|
260 |
* @access static
|
261 |
-
*
|
|
|
|
|
262 |
* @return array $render
|
263 |
*/
|
264 |
-
static function display_render_options( $options )
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
|
269 |
if ( is_plugin_active( 'regenerate-thumbnails/regenerate-thumbnails.php' ) ){
|
270 |
$regenerate_link = admin_url( '/tools.php?page=regenerate-thumbnails' );
|
271 |
-
} elseif ( array_key_exists( 'regenerate-thumbnails/regenerate-thumbnails.php', get_plugins() ) ){
|
272 |
$regenerate_link = admin_url( '/plugins.php#regenerate-thumbnails' );
|
273 |
} else {
|
274 |
$regenerate_link = wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=regenerate-thumbnails' ), 'install-plugin_regenerate-thumbnails' );
|
275 |
}
|
276 |
|
277 |
$render = array(
|
278 |
-
'general_enableComments'
|
279 |
-
'title'
|
280 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
281 |
'args' => array(
|
282 |
'key' => 'general_enableComments',
|
283 |
'value' => $options['general_enableComments'],
|
284 |
-
'desc' => __( 'This will display comment form and comment listing on single media pages as well as inside lightbox (if lightbox is enabled).', 'rtmedia' )
|
285 |
),
|
286 |
-
'group' =>
|
287 |
),
|
288 |
'general_enableLightbox' => array(
|
289 |
-
'title'
|
290 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
291 |
'args' => array(
|
292 |
'key' => 'general_enableLightbox',
|
293 |
'value' => $options['general_enableLightbox'],
|
294 |
-
'desc' => __( 'View single media in facebook style lightbox.', 'rtmedia' )
|
295 |
),
|
296 |
-
'group' =>
|
297 |
),
|
298 |
-
'general_perPageMedia'
|
299 |
-
'title'
|
300 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
301 |
'args' => array(
|
302 |
'key' => 'general_perPageMedia',
|
303 |
'value' => $options['general_perPageMedia'],
|
304 |
'class' => array( 'rtmedia-setting-text-box' ),
|
305 |
'desc' => __( 'Number of media you want to show per page on front end.', 'rtmedia' ),
|
306 |
-
'min' => 1
|
307 |
),
|
308 |
-
'group' =>
|
309 |
),
|
310 |
-
'general_display_media'
|
311 |
-
'title'
|
312 |
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
313 |
'args' => array(
|
314 |
'key' => 'general_display_media',
|
315 |
'radios' => $radios,
|
316 |
'default' => $options['general_display_media'],
|
317 |
'desc' => __( 'Choose whether you want load more button or pagination buttons.', 'rtmedia' ),
|
318 |
-
'class' => array( 'rtmedia-load-more-radio' )
|
319 |
),
|
320 |
-
'group' =>
|
321 |
-
),
|
322 |
-
|
323 |
-
'title' => __( 'Enable', 'rtmedia' ) . ' <a href="http://masonry.desandro.com/" target="_blank">Masonry</a> '. __( 'Cascading grid layout', 'rtmedia'),
|
324 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
325 |
'args' => array(
|
326 |
'key' => 'general_masonry_layout',
|
@@ -328,8 +348,8 @@ class RTMediaFormHandler {
|
|
328 |
'desc' => __( 'Masonry works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall.', 'rtmedia' ),
|
329 |
'class' => array( 'rtm_enable_masonry_view' ),
|
330 |
),
|
331 |
-
'group' =>
|
332 |
-
'after_content' => __( 'You might need to', 'rtmedia' ) . ' <a id="rtm-masonry-change-thumbnail-info" href="' . get_admin_url() . 'admin.php?page=rtmedia-settings#rtmedia-sizes">' . __( 'change thumbnail size', 'rtmedia' ) . '</a> ' . __( 'and uncheck the crop box for thumbnails.', 'rtmedia' ) . '<br />' . __( 'If you enable masonry view, it is advisable to', 'rtmedia' ) . ' <a href="'
|
333 |
),
|
334 |
);
|
335 |
|
@@ -340,49 +360,53 @@ class RTMediaFormHandler {
|
|
340 |
* display content.
|
341 |
*
|
342 |
* @access static
|
|
|
343 |
* @param void
|
|
|
344 |
* @return void
|
345 |
*/
|
346 |
-
public static function display_content()
|
347 |
global $rtmedia;
|
348 |
-
// $options = self::extract_settings('general', $rtmedia->options);
|
349 |
-
$options
|
350 |
$render_options = self::display_render_options( $options );
|
351 |
-
// $render_options = apply_filters('rtmedia_general_content_single_view_add_itmes',$render_options, $options);
|
352 |
-
|
353 |
-
$general_group
|
354 |
-
$general_group[10] =
|
355 |
-
$general_group[15] =
|
356 |
-
$general_group[18] =
|
357 |
-
$general_group
|
358 |
ksort( $general_group );
|
359 |
$html = '';
|
360 |
foreach ( $general_group as $key => $value ) {
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
|
367 |
-
if( ! isset($option['group']) ){
|
368 |
-
|
369 |
}
|
370 |
|
371 |
-
if( $option['group'] != $key ){
|
372 |
-
|
373 |
}
|
374 |
-
|
375 |
<div class="row section">
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
<div class="columns large-3">
|
380 |
-
|
381 |
-
|
|
|
|
|
382 |
</div>
|
383 |
</div>
|
384 |
-
|
385 |
-
if( isset( $option['after_content'] ) ){
|
386 |
?>
|
387 |
<div class="row">
|
388 |
<div class="columns large-12">
|
@@ -391,12 +415,12 @@ class RTMediaFormHandler {
|
|
391 |
</p>
|
392 |
</div>
|
393 |
</div>
|
394 |
-
|
395 |
}
|
396 |
-
|
397 |
-
|
398 |
</div>
|
399 |
-
|
400 |
}
|
401 |
|
402 |
}
|
@@ -405,62 +429,64 @@ class RTMediaFormHandler {
|
|
405 |
* render general content.
|
406 |
*
|
407 |
* @access static
|
|
|
408 |
* @param array $options
|
|
|
409 |
* @return array $render
|
410 |
*/
|
411 |
-
static function render_general_content( $options )
|
412 |
$render = array(
|
413 |
-
'general_AllowUserData'
|
414 |
'title' => __( 'Allow usage data tracking', 'rtmedia' ),
|
415 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
416 |
'args' => array(
|
417 |
'key' => 'general_AllowUserData',
|
418 |
'value' => $options['general_AllowUserData'],
|
419 |
-
'desc' => __( 'You can help rtMedia team learn what themes and plugins you are using to make rtMedia better compatible with your sites. No private information about your setup will be sent during tracking.', 'rtmedia' )
|
420 |
)
|
421 |
),
|
422 |
'general_showAdminMenu' => array(
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
)
|
432 |
-
'rtmedia_add_linkback'
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
)
|
442 |
-
'rtmedia_affiliate_id'
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
)
|
453 |
-
'rtmedia_enable_api'
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
)
|
464 |
);
|
465 |
|
466 |
return $render;
|
@@ -470,219 +496,240 @@ class RTMediaFormHandler {
|
|
470 |
* Define general_content
|
471 |
*
|
472 |
* @access static
|
|
|
473 |
* @param array $options
|
|
|
474 |
* @return void
|
475 |
*/
|
476 |
-
static function general_content( $options )
|
477 |
-
|
478 |
-
// $options = self::extract_settings('general', $rtmedia->options);
|
479 |
-
$options
|
480 |
-
$render_options
|
481 |
-
|
482 |
-
$general_group
|
483 |
-
$general_group[10]
|
484 |
-
$general_group[80]
|
485 |
-
$general_group[90]
|
486 |
-
$general_group[100] =
|
487 |
-
$general_group
|
488 |
ksort( $general_group );
|
489 |
$html = '';
|
490 |
foreach ( $general_group as $key => $value ) {
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
|
497 |
-
if( ! isset( $option['group'] ) ){
|
498 |
-
|
499 |
}
|
500 |
|
501 |
-
if( $option['group'] != $key ){
|
502 |
-
|
503 |
}
|
504 |
-
|
505 |
<div class="row section">
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
|
|
|
|
513 |
</div>
|
514 |
-
|
515 |
-
if( isset( $option['after_content'] ) ){
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
|
|
522 |
</div>
|
523 |
-
|
524 |
-
<?php
|
525 |
}
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
</div>
|
531 |
-
|
532 |
}
|
533 |
}
|
534 |
|
535 |
-
|
536 |
* Get type details
|
537 |
*
|
538 |
* @access static
|
|
|
539 |
* @param array $allowed_types
|
540 |
* @param string $key
|
|
|
541 |
* @return array $data
|
542 |
*/
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
$data['settings_visibility'] = $type['settings_visibility'];
|
552 |
-
|
553 |
-
return $data;
|
554 |
-
}
|
555 |
-
}
|
556 |
-
}
|
557 |
|
558 |
-
|
|
|
|
|
|
|
|
|
|
|
559 |
* Define types_render_options.
|
560 |
*
|
561 |
* @access static
|
562 |
-
*
|
|
|
|
|
563 |
* @return array $render
|
564 |
*/
|
565 |
-
|
566 |
-
|
567 |
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
$render[$data[1]] = self::get_type_details( $allowed_media_type, $data[1] );
|
576 |
-
|
577 |
-
|
578 |
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
|
584 |
-
|
585 |
-
|
586 |
|
587 |
-
|
588 |
* Define types_content.
|
589 |
*
|
590 |
* @access static
|
|
|
591 |
* @param void
|
|
|
592 |
* @return void
|
593 |
*/
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
|
598 |
-
|
599 |
?>
|
600 |
-
|
601 |
-
|
602 |
<span>Media Types Settings</span>
|
603 |
-
<?php do_action(
|
604 |
</h3>
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
<?php do_action(
|
609 |
-
|
610 |
-
|
611 |
-
<
|
612 |
-
|
613 |
-
|
614 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
|
616 |
<?php
|
617 |
$even = 0;
|
618 |
foreach ( $render_data as $key => $section ) {
|
619 |
-
|
620 |
|
621 |
-
if( ++$even%2 ){
|
622 |
-
|
623 |
} else {
|
624 |
-
|
625 |
}
|
626 |
|
627 |
-
do_action(
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
$section['extn'] = array();
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
do_action(
|
649 |
-
|
650 |
-
|
651 |
-
echo '<label class="columns large-3">'.__(
|
652 |
echo '<label class="columns large-9 rtmedia_type_settings_filter_extension">' . $extensions . '</label>';
|
653 |
-
|
654 |
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
}
|
660 |
echo '</div>';
|
661 |
-
|
662 |
-
|
663 |
}
|
664 |
|
665 |
/**
|
666 |
* Define sizes_render_options.
|
667 |
*
|
668 |
* @access static
|
|
|
669 |
* @param array $options
|
|
|
670 |
* @return array $render
|
671 |
*/
|
672 |
-
static function sizes_render_options( $options )
|
673 |
$render = array();
|
674 |
foreach ( $options as $key => $value ) {
|
675 |
$data = explode( '_', $key );
|
676 |
-
if( ! isset( $render[$data[1]] ) ){
|
677 |
-
$render[$data[1]]
|
678 |
-
$render[$data[1]]['title'] = __( $data[1],
|
679 |
}
|
680 |
-
if( ! isset( $render[$data[1]][$data[2]] ) ){
|
681 |
-
$render[$data[1]][$data[2]]
|
682 |
-
$render[$data[1]][$data[2]]['title'] = __( $data[2],
|
683 |
}
|
684 |
|
685 |
-
$render[$data[1]][$data[2]][$data[3]] = $value;
|
686 |
}
|
687 |
|
688 |
return $render;
|
@@ -692,34 +739,36 @@ class RTMediaFormHandler {
|
|
692 |
* Define sizes_content.
|
693 |
*
|
694 |
* @access static
|
|
|
695 |
* @param void
|
|
|
696 |
* @return void
|
697 |
*/
|
698 |
-
public static function sizes_content()
|
699 |
global $rtmedia;
|
700 |
-
$options
|
701 |
$render_data = self::sizes_render_options( $options );
|
702 |
?>
|
703 |
-
|
704 |
<h3 class="hndle">
|
705 |
<span>Media Size Settings</span>
|
706 |
</h3>
|
707 |
-
|
708 |
<?php
|
709 |
//container
|
710 |
echo '<div class="rt-table large-12 rtmedia-size-content-setting">';
|
711 |
|
712 |
//header
|
713 |
echo '<div class="rt-header row">';
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
echo'</div>';
|
718 |
|
719 |
//body
|
720 |
$even = 0;
|
721 |
foreach ( $render_data as $parent_key => $section ) {
|
722 |
-
if( ++$even%2 ){
|
723 |
echo '<div class="row rt-odd">';
|
724 |
} else {
|
725 |
echo '<div class="row rt-even">';
|
@@ -735,11 +784,11 @@ class RTMediaFormHandler {
|
|
735 |
echo '<div class="columns large-6">';
|
736 |
foreach ( $entities as $entity ) {
|
737 |
$args = array(
|
738 |
-
'key' => 'defaultSizes_'
|
739 |
);
|
740 |
foreach ( $entity as $child_key => $value ) {
|
741 |
-
if(
|
742 |
-
$args[$child_key] = $value;
|
743 |
}
|
744 |
}
|
745 |
self::dimensions( $args );
|
@@ -751,150 +800,164 @@ class RTMediaFormHandler {
|
|
751 |
echo '</div>';
|
752 |
$options = $rtmedia->options;
|
753 |
$render_video_thumb = array(
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
|
|
764 |
?>
|
765 |
<div class="postbox metabox-holder">
|
766 |
-
|
767 |
</div>
|
768 |
<div class="row section">
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
|
|
|
|
776 |
</div>
|
777 |
-
|
778 |
}
|
779 |
|
780 |
-
|
781 |
* Define custom css content.
|
782 |
*
|
783 |
* @access static
|
|
|
784 |
* @param void
|
|
|
785 |
* @return void
|
786 |
*/
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
<
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
|
|
|
|
|
|
|
|
|
|
820 |
|
821 |
/**
|
822 |
* Render custom css options.
|
823 |
*
|
824 |
* @access static
|
|
|
825 |
* @param array $options
|
|
|
826 |
* @return array $render
|
827 |
*/
|
828 |
-
static function custom_css_render_options( $options )
|
829 |
-
|
830 |
|
831 |
-
|
832 |
-
|
833 |
-
'title' => __(
|
834 |
-
'callback' => array(
|
835 |
'args' => array(
|
836 |
'id' => 'rtmedia-disable-styles',
|
837 |
'key' => 'styles_enabled',
|
838 |
'value' => $options['styles_enabled'],
|
839 |
-
'desc' => __( 'Load default rtMedia styles. You need to write your own style for rtMedia if you disable it.', 'rtmedia' )
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
'title' => __(
|
844 |
-
'callback' => array(
|
845 |
'args' => array(
|
846 |
'id' => 'rtmedia-custom-css',
|
847 |
'key' => 'styles_custom',
|
848 |
'value' => stripcslashes( $options['styles_custom'] ),
|
849 |
-
'desc' => __( 'Custom rtMedia CSS container', 'rtmedia' )
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
|
854 |
-
|
855 |
-
|
856 |
|
857 |
/**
|
858 |
* Render privacy options.
|
859 |
*
|
860 |
* @access static
|
|
|
861 |
* @param array $options
|
|
|
862 |
* @return array $render
|
863 |
*/
|
864 |
-
static function privacy_render_options( $options )
|
865 |
global $rtmedia;
|
866 |
|
867 |
$render = array(
|
868 |
-
'enable'
|
869 |
-
'title' => __(
|
870 |
-
'callback' => array(
|
871 |
'args' => array(
|
872 |
'id' => 'rtmedia-privacy-enable',
|
873 |
'key' => 'privacy_enabled',
|
874 |
'value' => $options['privacy_enabled'],
|
875 |
-
'desc' => __( 'Enable privacy in rtMedia', 'rtmedia' )
|
876 |
)
|
877 |
),
|
878 |
-
'default'
|
879 |
-
'title' => __(
|
880 |
-
'callback' => array(
|
881 |
'args' => array(
|
882 |
'key' => 'privacy_default',
|
883 |
'radios' => $rtmedia->privacy_settings['levels'],
|
884 |
'default' => $options['privacy_default'],
|
885 |
-
'desc' => __( 'Set default privacy for media', 'rtmedia' )
|
886 |
),
|
887 |
),
|
888 |
'user_override' => array(
|
889 |
-
'title'
|
890 |
-
'callback' => array(
|
891 |
'args' => array(
|
892 |
'key' => 'privacy_userOverride',
|
893 |
'value' => $options['privacy_userOverride'],
|
894 |
-
'desc' => __( 'If you choose this, user will be able to change privacy of their own uploads.', 'rtmedia' )
|
895 |
),
|
896 |
-
'after_content' => __( 'For group uploads, BuddyPress groups privacy is used.', 'rtmedia' )
|
897 |
-
)
|
898 |
);
|
899 |
|
900 |
return $render;
|
@@ -904,51 +967,55 @@ class RTMediaFormHandler {
|
|
904 |
* Render privacy content.
|
905 |
*
|
906 |
* @access static
|
|
|
907 |
* @param void
|
|
|
908 |
* @return void
|
909 |
*/
|
910 |
-
public static function privacy_content()
|
911 |
global $rtmedia;
|
912 |
$options = self::extract_settings( 'privacy', $rtmedia->options );
|
913 |
|
914 |
$render_data = self::privacy_render_options( $options );
|
915 |
?>
|
916 |
-
|
917 |
<h3 class="hndle"><span>Privacy Settings</span></h3>
|
918 |
-
|
919 |
<?php
|
920 |
echo '<div class="large-12">';
|
921 |
-
|
922 |
-
|
923 |
-
?>
|
924 |
-
<div class="columns large-6">
|
925 |
-
<?php echo $privacy['title'] ?>
|
926 |
-
</div>
|
927 |
-
<?php
|
928 |
-
echo '<div class="columns large-6">';
|
929 |
-
if( $key != "enable" ){
|
930 |
-
call_user_func( $privacy['callback'], array_merge_recursive( $privacy['args'], array( 'class' => array( "privacy-driven-disable" ) ) ) );
|
931 |
-
} else {
|
932 |
-
call_user_func( $privacy['callback'], $privacy['args']);
|
933 |
-
}
|
934 |
-
?>
|
935 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $privacy['args']['desc'] ) ) ? $privacy['args']['desc'] : "NA"; ?>"><i class="rtmicon-info-circle"></i></span>
|
936 |
-
<?php
|
937 |
-
echo '</div>';
|
938 |
-
echo '</div>';
|
939 |
-
|
940 |
-
if( isset( $privacy['after_content'] ) ){
|
941 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
942 |
<div class="row">
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
</div>
|
949 |
<?php
|
950 |
-
}
|
951 |
}
|
|
|
952 |
echo '</div>';
|
953 |
}
|
954 |
|
@@ -956,38 +1023,40 @@ class RTMediaFormHandler {
|
|
956 |
* Render buddypress options.
|
957 |
*
|
958 |
* @access static
|
|
|
959 |
* @param array $options
|
|
|
960 |
* @return array $render
|
961 |
*/
|
962 |
-
static function buddypress_render_options( $options )
|
963 |
$render = array(
|
964 |
-
'rtmedia-enable-on-profile'
|
965 |
'title' => __( 'Enable media in profile', 'rtmedia' ),
|
966 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
967 |
'args' => array(
|
968 |
'key' => 'buddypress_enableOnProfile',
|
969 |
'value' => $options['buddypress_enableOnProfile'],
|
970 |
-
'desc' => __( 'Enable Media on BuddyPress Profile', 'rtmedia' )
|
971 |
-
)
|
972 |
),
|
973 |
-
'rtmedia-enable-on-group'
|
974 |
'title' => __( 'Enable media in group', 'rtmedia' ),
|
975 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
976 |
'args' => array(
|
977 |
'key' => 'buddypress_enableOnGroup',
|
978 |
'value' => $options['buddypress_enableOnGroup'],
|
979 |
-
'desc' => __( 'Enable Media on BuddyPress Groups', 'rtmedia' )
|
980 |
-
)
|
981 |
),
|
982 |
-
'rtmedia-enable-on-activity'
|
983 |
'title' => __( 'Allow upload from activity stream', 'rtmedia' ),
|
984 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
985 |
'args' => array(
|
986 |
'key' => 'buddypress_enableOnActivity',
|
987 |
'value' => $options['buddypress_enableOnActivity'],
|
988 |
'desc' => __( 'Allow upload using status update box present on activity stream page', 'rtmedia' ),
|
989 |
-
'id' =>
|
990 |
-
)
|
991 |
),
|
992 |
'rtmedia-activity-feed-limit' => array(
|
993 |
'title' => __( 'Number of media items to show in activity stream', 'rtmedia' ),
|
@@ -997,9 +1066,9 @@ class RTMediaFormHandler {
|
|
997 |
'value' => $options['buddypress_limitOnActivity'],
|
998 |
'desc' => __( 'With bulk uploads activity stream may get flooded. You can control maximum number of medias/files per activity. This limit will not affect the actual number of uploads. Only display. <em>0</em> means unlimited.', 'rtmedia' ),
|
999 |
'class' => array( 'rtmedia-setting-text-box rtmedia-bp-activity-setting' ),
|
1000 |
-
'min' => 0
|
1001 |
-
)
|
1002 |
-
)
|
1003 |
);
|
1004 |
|
1005 |
return $render;
|
@@ -1009,152 +1078,167 @@ class RTMediaFormHandler {
|
|
1009 |
* Define buddypress content.
|
1010 |
*
|
1011 |
* @access static
|
|
|
1012 |
* @param void
|
|
|
1013 |
* @return void
|
1014 |
*/
|
1015 |
public static function buddypress_content() {
|
1016 |
global $rtmedia;
|
|
|
1017 |
$options = self::extract_settings( 'buddypress', $rtmedia->options );
|
1018 |
-
|
1019 |
<div class="postbox metabox-holder">
|
1020 |
-
|
1021 |
-
|
1022 |
$render_data = self::buddypress_render_options( $options );
|
1023 |
|
1024 |
echo '<div class="large-12">';
|
1025 |
-
foreach ( $render_data as $option ) {
|
|
|
1026 |
<div class="row section">
|
1027 |
<div class="columns large-9">
|
1028 |
-
|
1029 |
</div>
|
1030 |
<div class="columns large-3">
|
1031 |
-
|
1032 |
-
|
|
|
|
|
1033 |
</div>
|
1034 |
</div>
|
1035 |
-
<?php
|
|
|
|
|
1036 |
echo '</div>';
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
$render_options = array(
|
1044 |
'general_enableAlbums' => array(
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
),
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
<?php echo $option['title']; ?>
|
1061 |
-
|
1062 |
-
|
1063 |
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
1064 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] :
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
|
|
|
|
1070 |
</div>
|
1071 |
-
|
1072 |
-
|
1073 |
}
|
1074 |
|
1075 |
/**
|
1076 |
* Define rtForm settings tabs content.
|
1077 |
*
|
1078 |
* @access static
|
1079 |
-
*
|
|
|
1080 |
* @param array $sub_tabs
|
|
|
1081 |
* @return void
|
1082 |
*/
|
1083 |
-
public static function rtForm_settings_tabs_content( $page, $sub_tabs )
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
ksort( $sub_tabs );
|
1092 |
foreach ( $sub_tabs as $tab ) {
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
}
|
1097 |
-
$i++;
|
1098 |
-
|
1099 |
-
|
1100 |
}
|
1101 |
-
|
1102 |
}
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
}
|
1132 |
|
1133 |
/**
|
1134 |
* Define rtForm do_settings_fields.
|
1135 |
*
|
1136 |
* @access static
|
|
|
1137 |
* @param type $page
|
1138 |
* @param type $section
|
|
|
1139 |
* @return void
|
1140 |
*/
|
1141 |
-
public static function rtForm_do_settings_fields( $page, $section )
|
1142 |
global $wp_settings_fields;
|
1143 |
|
1144 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[$page] ) || ! isset( $wp_settings_fields[$page][$section] ) ){
|
1145 |
return;
|
1146 |
}
|
1147 |
|
1148 |
-
foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
|
1149 |
echo '<div class="row">';
|
1150 |
echo '<div class="large-11 columns">';
|
1151 |
|
1152 |
if ( isset( $field['args']['label_for'] ) && ! empty( $field['args']['label_for'] ) ){
|
1153 |
call_user_func( $field['callback'], array_merge( $field['args'], array( 'label' => $field['args']['label_for'] ) ) );
|
1154 |
-
} else if ( isset( $field['title'] ) && ! empty( $field['title'] ) ){
|
1155 |
-
call_user_func( $field['callback'], array_merge( $field['args'], array( 'label' => $field['title'] ) ) );
|
1156 |
} else {
|
1157 |
-
|
|
|
|
|
|
|
|
|
1158 |
}
|
1159 |
echo '</div>';
|
1160 |
echo '</div>';
|
12 |
*/
|
13 |
class RTMediaFormHandler {
|
14 |
|
15 |
+
public static function selectBox( $args ){
|
16 |
+
global $rtmedia;
|
17 |
+
$options = $rtmedia->options;
|
18 |
$defaults = array(
|
19 |
'key' => '',
|
20 |
'desc' => '',
|
21 |
+
'default' => '',
|
22 |
'show_desc' => false,
|
23 |
+
'selects' => array(),
|
24 |
);
|
25 |
+
$args = wp_parse_args( $args, $defaults );
|
26 |
extract( $args );
|
27 |
|
28 |
if ( ! empty( $key ) ){
|
33 |
foreach ( $selects as $value => $key ) {
|
34 |
$args['rtForm_options'][] = array(
|
35 |
$key => $value,
|
36 |
+
'selected' => ( $default == $value ) ? true : false,
|
37 |
);
|
38 |
}
|
39 |
|
45 |
* Show rtmedia textarea in admin options.
|
46 |
*
|
47 |
* @access static
|
48 |
+
*
|
49 |
+
* @param array $args
|
50 |
+
* @param bool $echo
|
51 |
+
*
|
52 |
* @return string $chkObj->get_textarea( $args )
|
53 |
*/
|
54 |
+
public static function textarea( $args, $echo = true ){
|
55 |
+
global $rtmedia;
|
56 |
+
$options = $rtmedia->options;
|
57 |
$defaults = array(
|
58 |
+
'id' => '',
|
59 |
'key' => '',
|
60 |
'desc' => '',
|
61 |
+
'show_desc' => false,
|
62 |
);
|
63 |
+
$args = wp_parse_args( $args, $defaults );
|
64 |
extract( $args );
|
65 |
|
66 |
if ( ! isset( $value ) ){
|
67 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
68 |
+
|
69 |
return;
|
70 |
}
|
71 |
|
77 |
|
78 |
$chkObj = new rtForm();
|
79 |
|
80 |
+
if ( $echo ){
|
81 |
+
echo $chkObj->get_textarea( $args );
|
82 |
+
} else {
|
83 |
+
return $chkObj->get_textarea( $args );
|
84 |
+
}
|
85 |
}
|
86 |
|
87 |
/**
|
88 |
* Show rtmedia checkbox in admin options.
|
89 |
*
|
90 |
* @access static
|
91 |
+
*
|
92 |
+
* @param array $args
|
93 |
+
* @param bool $echo
|
94 |
+
*
|
95 |
* @return string $chkObj->get_switch( $args )
|
96 |
*/
|
97 |
+
public static function checkbox( $args, $echo = true ){
|
98 |
global $rtmedia;
|
99 |
+
$options = $rtmedia->options;
|
100 |
$defaults = array(
|
101 |
'key' => '',
|
102 |
'desc' => '',
|
103 |
+
'show_desc' => false,
|
104 |
);
|
105 |
+
$args = wp_parse_args( $args, $defaults );
|
106 |
extract( $args );
|
107 |
|
108 |
if ( ! isset( $value ) ){
|
109 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
110 |
+
|
111 |
return;
|
112 |
}
|
113 |
|
118 |
$args['rtForm_options'] = array( array( '' => 1, 'checked' => $value ) );
|
119 |
|
120 |
$chkObj = new rtForm();
|
121 |
+
// echo $chkObj->get_checkbox($args);
|
122 |
+
if ( $echo ){
|
123 |
+
echo $chkObj->get_switch( $args );
|
124 |
} else {
|
125 |
+
return $chkObj->get_switch( $args );
|
126 |
}
|
127 |
+
// echo $chkObj->get_switch_square($args);
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
* Show rtmedia radio in admin options.
|
132 |
*
|
133 |
* @access static
|
134 |
+
*
|
135 |
+
* @param array $args
|
136 |
+
*
|
137 |
* @return void
|
138 |
*/
|
139 |
+
public static function radio( $args ){
|
140 |
global $rtmedia;
|
141 |
+
$options = $rtmedia->options;
|
142 |
$defaults = array(
|
143 |
'key' => '',
|
144 |
'radios' => array(),
|
145 |
'default' => '',
|
146 |
+
'show_desc' => false,
|
147 |
);
|
148 |
+
$args = wp_parse_args( $args, $defaults );
|
149 |
extract( $args );
|
150 |
|
151 |
if ( 2 > count( $radios ) ){
|
152 |
trigger_error( __( 'Need to specify atleast to radios else use a checkbox instead', 'rtmedia' ) );
|
153 |
+
|
154 |
return;
|
155 |
}
|
156 |
|
162 |
foreach ( $radios as $value => $key ) {
|
163 |
$args['rtForm_options'][] = array(
|
164 |
$key => $value,
|
165 |
+
'checked' => ( $default == $value ) ? true : false,
|
166 |
);
|
167 |
}
|
168 |
|
176 |
* @access static
|
177 |
* @return void
|
178 |
*/
|
179 |
+
public static function dimensions( $args ){
|
180 |
$dmnObj = new rtDimensions();
|
181 |
echo $dmnObj->get_dimensions( $args );
|
182 |
}
|
185 |
* Show rtmedia number in admin options.
|
186 |
*
|
187 |
* @access static
|
188 |
+
*
|
189 |
+
* @param array $args
|
190 |
+
*
|
191 |
* @return void
|
192 |
*/
|
193 |
+
public static function number( $args ){
|
194 |
global $rtmedia;
|
195 |
+
$options = $rtmedia->options;
|
196 |
$defaults = array(
|
197 |
'key' => '',
|
198 |
+
'desc' => '',
|
199 |
);
|
200 |
+
$args = wp_parse_args( $args, $defaults );
|
201 |
extract( $args );
|
202 |
|
203 |
if ( ! isset( $value ) ){
|
204 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
205 |
+
|
206 |
return;
|
207 |
}
|
208 |
|
220 |
* Show rtmedia textbox in admin options.
|
221 |
*
|
222 |
* @access static
|
223 |
+
*
|
224 |
+
* @param array $args
|
225 |
+
*
|
226 |
* @return void
|
227 |
*/
|
228 |
+
public static function textbox( $args ){
|
229 |
global $rtmedia;
|
230 |
+
$options = $rtmedia->options;
|
231 |
$defaults = array(
|
232 |
'key' => '',
|
233 |
+
'desc' => '',
|
234 |
);
|
235 |
+
$args = wp_parse_args( $args, $defaults );
|
236 |
extract( $args );
|
237 |
|
238 |
if ( ! isset( $value ) ){
|
239 |
trigger_error( __( 'Please provide "value" in the argument.', 'rtmedia' ) );
|
240 |
+
|
241 |
return;
|
242 |
}
|
243 |
|
255 |
* extract settings.
|
256 |
*
|
257 |
* @access static
|
258 |
+
*
|
259 |
* @param array $options
|
260 |
* @param string $section_name
|
261 |
+
*
|
262 |
* @return array $section
|
263 |
*/
|
264 |
+
static function extract_settings( $section_name, $options ){
|
265 |
$section = array();
|
266 |
foreach ( $options as $key => $value ) {
|
267 |
+
$compare = strncmp( $key, $section_name, strlen( $section_name ) );
|
268 |
+
if ( 0 == $compare ){
|
269 |
+
$section[ $key ] = $value;
|
270 |
+
}
|
271 |
}
|
272 |
|
273 |
return $section;
|
277 |
* display render options.
|
278 |
*
|
279 |
* @access static
|
280 |
+
*
|
281 |
+
* @param array $options
|
282 |
+
*
|
283 |
* @return array $render
|
284 |
*/
|
285 |
+
static function display_render_options( $options ){
|
286 |
+
$radios = array();
|
287 |
+
$radios['load_more'] = '<strong>Load More</strong>';
|
288 |
+
$radios['pagination'] = '<strong>Pagination</strong>';
|
289 |
|
290 |
if ( is_plugin_active( 'regenerate-thumbnails/regenerate-thumbnails.php' ) ){
|
291 |
$regenerate_link = admin_url( '/tools.php?page=regenerate-thumbnails' );
|
292 |
+
} elseif ( array_key_exists( 'regenerate-thumbnails/regenerate-thumbnails.php', get_plugins() ) ) {
|
293 |
$regenerate_link = admin_url( '/plugins.php#regenerate-thumbnails' );
|
294 |
} else {
|
295 |
$regenerate_link = wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=regenerate-thumbnails' ), 'install-plugin_regenerate-thumbnails' );
|
296 |
}
|
297 |
|
298 |
$render = array(
|
299 |
+
'general_enableComments' => array(
|
300 |
+
'title' => __( 'Allow user to comment on uploaded media', 'rtmedia' ),
|
301 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
302 |
'args' => array(
|
303 |
'key' => 'general_enableComments',
|
304 |
'value' => $options['general_enableComments'],
|
305 |
+
'desc' => __( 'This will display comment form and comment listing on single media pages as well as inside lightbox (if lightbox is enabled).', 'rtmedia' ),
|
306 |
),
|
307 |
+
'group' => '10',
|
308 |
),
|
309 |
'general_enableLightbox' => array(
|
310 |
+
'title' => __( 'Use lightbox to display media', 'rtmedia' ),
|
311 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
312 |
'args' => array(
|
313 |
'key' => 'general_enableLightbox',
|
314 |
'value' => $options['general_enableLightbox'],
|
315 |
+
'desc' => __( 'View single media in facebook style lightbox.', 'rtmedia' ),
|
316 |
),
|
317 |
+
'group' => '15',
|
318 |
),
|
319 |
+
'general_perPageMedia' => array(
|
320 |
+
'title' => __( 'Number of media per page', 'rtmedia' ),
|
321 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
322 |
'args' => array(
|
323 |
'key' => 'general_perPageMedia',
|
324 |
'value' => $options['general_perPageMedia'],
|
325 |
'class' => array( 'rtmedia-setting-text-box' ),
|
326 |
'desc' => __( 'Number of media you want to show per page on front end.', 'rtmedia' ),
|
327 |
+
'min' => 1,
|
328 |
),
|
329 |
+
'group' => '15',
|
330 |
),
|
331 |
+
'general_display_media' => array(
|
332 |
+
'title' => __( 'Media display pagination option', 'rtmedia' ),
|
333 |
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
334 |
'args' => array(
|
335 |
'key' => 'general_display_media',
|
336 |
'radios' => $radios,
|
337 |
'default' => $options['general_display_media'],
|
338 |
'desc' => __( 'Choose whether you want load more button or pagination buttons.', 'rtmedia' ),
|
339 |
+
'class' => array( 'rtmedia-load-more-radio' ),
|
340 |
),
|
341 |
+
'group' => '15',
|
342 |
+
), 'general_masonry_layout' => array(
|
343 |
+
'title' => __( 'Enable', 'rtmedia' ) . ' <a href="http://masonry.desandro.com/" target="_blank">Masonry</a> ' . __( 'Cascading grid layout', 'rtmedia' ),
|
|
|
344 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
345 |
'args' => array(
|
346 |
'key' => 'general_masonry_layout',
|
348 |
'desc' => __( 'Masonry works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall.', 'rtmedia' ),
|
349 |
'class' => array( 'rtm_enable_masonry_view' ),
|
350 |
),
|
351 |
+
'group' => '18',
|
352 |
+
'after_content' => __( 'You might need to', 'rtmedia' ) . ' <a id="rtm-masonry-change-thumbnail-info" href="' . get_admin_url() . 'admin.php?page=rtmedia-settings#rtmedia-sizes">' . __( 'change thumbnail size', 'rtmedia' ) . '</a> ' . __( 'and uncheck the crop box for thumbnails.', 'rtmedia' ) . '<br />' . __( 'If you enable masonry view, it is advisable to', 'rtmedia' ) . ' <a href="' . $regenerate_link . '">regenerate thumbnail</a> ' . __( 'for masonry view.', 'rtmedia' ) . '<br />' . __( 'To set gallery for fixed width, set image height to 0 and width as per your requirement and vice-versa.', 'rtmedia' ),
|
353 |
),
|
354 |
);
|
355 |
|
360 |
* display content.
|
361 |
*
|
362 |
* @access static
|
363 |
+
*
|
364 |
* @param void
|
365 |
+
*
|
366 |
* @return void
|
367 |
*/
|
368 |
+
public static function display_content(){
|
369 |
global $rtmedia;
|
370 |
+
// $options = self::extract_settings('general', $rtmedia->options);
|
371 |
+
$options = $rtmedia->options;
|
372 |
$render_options = self::display_render_options( $options );
|
373 |
+
// $render_options = apply_filters('rtmedia_general_content_single_view_add_itmes',$render_options, $options);
|
374 |
+
$render_options = apply_filters( 'rtmedia_display_content_add_itmes', $render_options, $options );
|
375 |
+
$general_group = array();
|
376 |
+
$general_group[10] = 'Single Media View';
|
377 |
+
$general_group[15] = 'List Media View';
|
378 |
+
$general_group[18] = 'Masonry View';
|
379 |
+
$general_group = apply_filters( 'rtmedia_display_content_groups', $general_group );
|
380 |
ksort( $general_group );
|
381 |
$html = '';
|
382 |
foreach ( $general_group as $key => $value ) {
|
383 |
+
?>
|
384 |
+
<div class="postbox metabox-holder">
|
385 |
+
<h3 class="hndle"><span><?php echo $value; ?></span></h3>
|
386 |
+
<?php
|
387 |
+
foreach ( $render_options as $tab => $option ) {
|
388 |
|
389 |
+
if ( ! isset( $option['group'] ) ){
|
390 |
+
$option['group'] = '20';
|
391 |
}
|
392 |
|
393 |
+
if ( $option['group'] != $key ){
|
394 |
+
continue;
|
395 |
}
|
396 |
+
?>
|
397 |
<div class="row section">
|
398 |
+
<div class="columns large-9">
|
399 |
+
<?php echo $option['title']; ?>
|
400 |
+
</div>
|
401 |
<div class="columns large-3">
|
402 |
+
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
403 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
404 |
+
<i class="rtmicon-info-circle"></i>
|
405 |
+
</span>
|
406 |
</div>
|
407 |
</div>
|
408 |
+
<?php
|
409 |
+
if ( isset( $option['after_content'] ) ){
|
410 |
?>
|
411 |
<div class="row">
|
412 |
<div class="columns large-12">
|
415 |
</p>
|
416 |
</div>
|
417 |
</div>
|
418 |
+
<?php
|
419 |
}
|
420 |
+
}
|
421 |
+
?>
|
422 |
</div>
|
423 |
+
<?php
|
424 |
}
|
425 |
|
426 |
}
|
429 |
* render general content.
|
430 |
*
|
431 |
* @access static
|
432 |
+
*
|
433 |
* @param array $options
|
434 |
+
*
|
435 |
* @return array $render
|
436 |
*/
|
437 |
+
static function render_general_content( $options ){
|
438 |
$render = array(
|
439 |
+
'general_AllowUserData' => array(
|
440 |
'title' => __( 'Allow usage data tracking', 'rtmedia' ),
|
441 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
442 |
'args' => array(
|
443 |
'key' => 'general_AllowUserData',
|
444 |
'value' => $options['general_AllowUserData'],
|
445 |
+
'desc' => __( 'You can help rtMedia team learn what themes and plugins you are using to make rtMedia better compatible with your sites. No private information about your setup will be sent during tracking.', 'rtmedia' ),
|
446 |
)
|
447 |
),
|
448 |
'general_showAdminMenu' => array(
|
449 |
+
'title' => __( 'Admin bar menu integration', 'rtmedia' ),
|
450 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
451 |
+
'args' => array(
|
452 |
+
'key' => 'general_showAdminMenu',
|
453 |
+
'value' => $options['general_showAdminMenu'],
|
454 |
+
'desc' => __( 'Add rtMedia menu to WordPress admin bar for easy access to settings and moderation page (if enabled).', 'rtmedia' ),
|
455 |
+
),
|
456 |
+
'group' => 10,
|
457 |
+
), //
|
458 |
+
'rtmedia_add_linkback' => array(
|
459 |
+
'title' => __( 'Add a link to rtMedia in footer', 'rtmedia' ),
|
460 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
461 |
+
'args' => array(
|
462 |
+
'key' => 'rtmedia_add_linkback',
|
463 |
+
'value' => $options['rtmedia_add_linkback'],
|
464 |
+
'desc' => __( 'Help us to promote rtMedia.', 'rtmedia' ),
|
465 |
+
),
|
466 |
+
'group' => 100,
|
467 |
+
), //
|
468 |
+
'rtmedia_affiliate_id' => array(
|
469 |
+
'title' => __( 'Also add my affiliate-id to rtMedia footer link', 'rtmedia' ),
|
470 |
+
'callback' => array( 'RTMediaFormHandler', 'textbox' ),
|
471 |
+
'args' => array(
|
472 |
+
'key' => 'rtmedia_affiliate_id',
|
473 |
+
'value' => $options['rtmedia_affiliate_id'],
|
474 |
+
'desc' => __( 'Add your affiliate-id along with footer link and get benefited from our affiliation program.', 'rtmedia' ),
|
475 |
+
),
|
476 |
+
'group' => 100,
|
477 |
+
'after_content' => __( 'You can signup for rtMedia affiliate program from <a href="https://rtcamp.com/affiliates">here</a>' ),
|
478 |
+
), //
|
479 |
+
'rtmedia_enable_api' => array(
|
480 |
+
'title' => __( 'Enable JSON API', 'rtmedia' ),
|
481 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
482 |
+
'args' => array(
|
483 |
+
'key' => 'rtmedia_enable_api',
|
484 |
+
'value' => $options['rtmedia_enable_api'],
|
485 |
+
'desc' => __( 'This will allow handling API requests for rtMedia sent through any mobile app.', 'rtmedia' ),
|
486 |
+
),
|
487 |
+
'group' => 80,
|
488 |
+
'after_content' => __( 'You can refer API document from <a href="https://rtcamp.com/rtmedia/docs/developer/json-api/">here</a>' ),
|
489 |
+
), //
|
490 |
);
|
491 |
|
492 |
return $render;
|
496 |
* Define general_content
|
497 |
*
|
498 |
* @access static
|
499 |
+
*
|
500 |
* @param array $options
|
501 |
+
*
|
502 |
* @return void
|
503 |
*/
|
504 |
+
static function general_content( $options ){
|
505 |
+
global $rtmedia;
|
506 |
+
// $options = self::extract_settings('general', $rtmedia->options);
|
507 |
+
$options = $rtmedia->options;
|
508 |
+
$render_options = self::render_general_content( $options );
|
509 |
+
$render_options = apply_filters( 'rtmedia_general_content_add_itmes', $render_options, $options );
|
510 |
+
$general_group = array();
|
511 |
+
$general_group[10] = 'Admin Settings';
|
512 |
+
$general_group[80] = 'API Settings';
|
513 |
+
$general_group[90] = 'Miscellaneous';
|
514 |
+
$general_group[100] = 'Footer Link';
|
515 |
+
$general_group = apply_filters( 'rtmedia_general_content_groups', $general_group );
|
516 |
ksort( $general_group );
|
517 |
$html = '';
|
518 |
foreach ( $general_group as $key => $value ) {
|
519 |
+
?>
|
520 |
+
<div class="postbox metabox-holder">
|
521 |
+
<h3 class="hndle"><span><?php echo $value; ?></span></h3>
|
522 |
+
<?php
|
523 |
+
foreach ( $render_options as $tab => $option ) {
|
524 |
|
525 |
+
if ( ! isset( $option['group'] ) ){
|
526 |
+
$option['group'] = '90';
|
527 |
}
|
528 |
|
529 |
+
if ( $option['group'] != $key ){
|
530 |
+
continue;
|
531 |
}
|
532 |
+
?>
|
533 |
<div class="row section">
|
534 |
+
<div class="columns large-7">
|
535 |
+
<?php echo $option['title']; ?>
|
536 |
+
</div>
|
537 |
+
<div class="columns large-5">
|
538 |
+
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
539 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
540 |
+
<i class="rtmicon-info-circle"></i>
|
541 |
+
</span>
|
542 |
+
</div>
|
543 |
</div>
|
544 |
+
<?php
|
545 |
+
if ( isset( $option['after_content'] ) ){
|
546 |
+
?>
|
547 |
+
<div class="row">
|
548 |
+
<div class="columns large-12">
|
549 |
+
<p class="rtmedia-info rtmedia-admin-notice">
|
550 |
+
<?php echo $option['after_content']; ?>
|
551 |
+
</p>
|
552 |
+
</div>
|
553 |
</div>
|
554 |
+
<?php
|
|
|
555 |
}
|
556 |
+
?>
|
557 |
+
<?php
|
558 |
+
}
|
559 |
+
?>
|
560 |
</div>
|
561 |
+
<?php
|
562 |
}
|
563 |
}
|
564 |
|
565 |
+
/**
|
566 |
* Get type details
|
567 |
*
|
568 |
* @access static
|
569 |
+
*
|
570 |
* @param array $allowed_types
|
571 |
* @param string $key
|
572 |
+
*
|
573 |
* @return array $data
|
574 |
*/
|
575 |
+
static function get_type_details( $allowed_types, $key ){
|
576 |
+
foreach ( $allowed_types as $type ) {
|
577 |
+
if ( $type['name'] == $key ){
|
578 |
+
$data = array(
|
579 |
+
'name' => $type['label'],
|
580 |
+
'extn' => $type['extn'],
|
581 |
+
);
|
582 |
+
if ( isset( $type['settings_visibility'] ) ){
|
583 |
$data['settings_visibility'] = $type['settings_visibility'];
|
584 |
+
}
|
|
|
|
|
|
|
|
|
585 |
|
586 |
+
return $data;
|
587 |
+
}
|
588 |
+
}
|
589 |
+
}
|
590 |
+
|
591 |
+
/**
|
592 |
* Define types_render_options.
|
593 |
*
|
594 |
* @access static
|
595 |
+
*
|
596 |
+
* @param array $options
|
597 |
+
*
|
598 |
* @return array $render
|
599 |
*/
|
600 |
+
static function types_render_options( $options ){
|
601 |
+
global $rtmedia;
|
602 |
|
603 |
+
$render = array();
|
604 |
+
$allowed_media_type = $rtmedia->allowed_types;
|
605 |
+
$allowed_media_type = apply_filters( 'rtmedia_allowed_types', $allowed_media_type );
|
606 |
|
607 |
+
foreach ( $options as $key => $value ) {
|
608 |
+
$data = explode( '_', $key );
|
609 |
+
if ( ! isset( $render[ $data[1] ] ) ){
|
610 |
+
$render[ $data[1] ] = self::get_type_details( $allowed_media_type, $data[1] );
|
611 |
+
}
|
612 |
+
}
|
613 |
|
614 |
+
foreach ( $options as $key => $value ) {
|
615 |
+
$data = explode( '_', $key );
|
616 |
+
$render[ $data[1] ][ $data[2] ] = $value;
|
617 |
+
}
|
618 |
|
619 |
+
return $render;
|
620 |
+
}
|
621 |
|
622 |
+
/**
|
623 |
* Define types_content.
|
624 |
*
|
625 |
* @access static
|
626 |
+
*
|
627 |
* @param void
|
628 |
+
*
|
629 |
* @return void
|
630 |
*/
|
631 |
+
public static function types_content(){
|
632 |
+
global $rtmedia;
|
633 |
+
$options = self::extract_settings( 'allowedTypes', $rtmedia->options );
|
634 |
|
635 |
+
$render_data = self::types_render_options( $options );
|
636 |
?>
|
637 |
+
<div class="postbox metabox-holder">
|
638 |
+
<h3 class="hndle">
|
639 |
<span>Media Types Settings</span>
|
640 |
+
<?php do_action( 'rtmedia_media_type_setting_message' ); ?>
|
641 |
</h3>
|
642 |
+
</div>
|
643 |
+
<div class="rt-table large-12">
|
644 |
+
<div class="row rt-header">
|
645 |
+
<?php do_action( 'rtmedia_type_settings_before_heading' ); ?>
|
646 |
+
<div class="columns large-4"><h4><?php _e( 'Media Type', 'rtmedia' ) ?></h4></div>
|
647 |
+
<div class="columns large-4">
|
648 |
+
<h4 data-tooltip class="has-tip" title="<?php _e( 'Allows you to upload a particular media type on your post.', 'rtmedia' ); ?>">
|
649 |
+
<abbr><?php _e( 'Allow Upload', 'rtmedia' ); ?></abbr>
|
650 |
+
</h4>
|
651 |
</div>
|
652 |
+
<div class="columns large-4">
|
653 |
+
<h4 data-tooltip class="has-tip" title="<?php _e( 'Put a specific media as a featured content on the post.', 'rtmedia' ); ?>">
|
654 |
+
<abbr><?php _e( 'Set Featured', 'rtmedia' ); ?></abbr>
|
655 |
+
</h4>
|
656 |
+
</div>
|
657 |
+
|
658 |
+
<?php do_action( 'rtmedia_type_settings_after_heading' ); ?>
|
659 |
+
</div>
|
660 |
|
661 |
<?php
|
662 |
$even = 0;
|
663 |
foreach ( $render_data as $key => $section ) {
|
664 |
+
if ( isset( $section['settings_visibility'] ) && true == $section['settings_visibility'] ){
|
665 |
|
666 |
+
if ( ++$even % 2 ){
|
667 |
+
echo '<div class="row rt-odd">';
|
668 |
} else {
|
669 |
+
echo '<div class="row rt-even">';
|
670 |
}
|
671 |
|
672 |
+
do_action( 'rtmedia_type_settings_before_body' );
|
673 |
+
echo '<div class="columns large-4">' . $section['name'] . '</div>';
|
674 |
+
$args = array( 'key' => 'allowedTypes_' . $key . '_enabled', 'value' => $section['enabled'] );
|
675 |
+
echo '<div class="columns large-4">';
|
676 |
+
$allow_upload_checkbox = self::checkbox( $args, $echo = false );
|
677 |
+
$allow_upload_checkbox = apply_filters( 'rtmedia_filter_allow_upload_checkbox', $allow_upload_checkbox, $key, $args );
|
678 |
+
echo $allow_upload_checkbox;
|
679 |
+
echo '</div>';
|
680 |
+
$args = array( 'key' => 'allowedTypes_' . $key . '_featured', 'value' => $section['featured'] );
|
681 |
+
echo '<div class="columns large-4">';
|
682 |
+
$featured_checkbox = self::checkbox( $args, $echo = false );
|
683 |
+
$featured_checkbox = apply_filters( 'rtmedia_filter_featured_checkbox', $featured_checkbox, $key );
|
684 |
+
echo $featured_checkbox;
|
685 |
+
echo '</div>';
|
686 |
+
|
687 |
+
if ( ! isset( $section['extn'] ) || ! is_array( $section['extn'] ) ){
|
688 |
$section['extn'] = array();
|
689 |
+
}
|
690 |
+
|
691 |
+
$extensions = implode( ', ', $section['extn'] );
|
692 |
+
$extensions = apply_filters( 'rtmedia_type_settings_filter_extension', $extensions, $key );
|
693 |
+
do_action( 'rtmedia_type_settings_after_body', $key, $section );
|
694 |
+
echo '</div>';
|
695 |
+
echo '<div class="row rtmedia-file-extension-wrap">';
|
696 |
+
echo '<label class="columns large-3">' . __( 'File Extensions', 'rtmedia' ) . ':</label>';
|
697 |
echo '<label class="columns large-9 rtmedia_type_settings_filter_extension">' . $extensions . '</label>';
|
698 |
+
echo '</div>';
|
699 |
|
700 |
+
} else {
|
701 |
+
echo "<input type='hidden' value='1' name='rtmedia-options[allowedTypes_" . $key . "_enabled]'>";
|
702 |
+
echo "<input type='hidden' value='0' name='rtmedia-options[allowedTypes_" . $key . "_featured]'>";
|
703 |
+
}
|
704 |
}
|
705 |
echo '</div>';
|
706 |
+
do_action( 'rtmedia_after_bp_settings' );
|
707 |
+
do_action( 'rtmedia_after_media_types_settings' );
|
708 |
}
|
709 |
|
710 |
/**
|
711 |
* Define sizes_render_options.
|
712 |
*
|
713 |
* @access static
|
714 |
+
*
|
715 |
* @param array $options
|
716 |
+
*
|
717 |
* @return array $render
|
718 |
*/
|
719 |
+
static function sizes_render_options( $options ){
|
720 |
$render = array();
|
721 |
foreach ( $options as $key => $value ) {
|
722 |
$data = explode( '_', $key );
|
723 |
+
if ( ! isset( $render[ $data[1] ] ) ){
|
724 |
+
$render[ $data[1] ] = array();
|
725 |
+
$render[ $data[1] ]['title'] = __( $data[1], 'rtmedia' );
|
726 |
}
|
727 |
+
if ( ! isset( $render[ $data[1] ][ $data[2] ] ) ){
|
728 |
+
$render[ $data[1] ][ $data[2] ] = array();
|
729 |
+
$render[ $data[1] ][ $data[2] ]['title'] = __( $data[2], 'rtmedia' );
|
730 |
}
|
731 |
|
732 |
+
$render[ $data[1] ][ $data[2] ][ $data[3] ] = $value;
|
733 |
}
|
734 |
|
735 |
return $render;
|
739 |
* Define sizes_content.
|
740 |
*
|
741 |
* @access static
|
742 |
+
*
|
743 |
* @param void
|
744 |
+
*
|
745 |
* @return void
|
746 |
*/
|
747 |
+
public static function sizes_content(){
|
748 |
global $rtmedia;
|
749 |
+
$options = self::extract_settings( 'defaultSizes', $rtmedia->options );
|
750 |
$render_data = self::sizes_render_options( $options );
|
751 |
?>
|
752 |
+
<div class="postbox metabox-holder">
|
753 |
<h3 class="hndle">
|
754 |
<span>Media Size Settings</span>
|
755 |
</h3>
|
756 |
+
</div>
|
757 |
<?php
|
758 |
//container
|
759 |
echo '<div class="rt-table large-12 rtmedia-size-content-setting">';
|
760 |
|
761 |
//header
|
762 |
echo '<div class="rt-header row">';
|
763 |
+
echo '<h4 class="columns large-3">' . __( 'Category', 'rtmedia' ) . '</h4>';
|
764 |
+
echo '<h4 class="columns large-3">' . __( 'Entity', 'rtmedia' ) . '</h4>';
|
765 |
+
echo '<h4 class="columns large-6"><span class="large-offset-2">' . __( 'Width', 'rtmedia' ) . '</span><span class="large-offset-2">' . __( 'Height', 'rtmedia' ) . '</span><span class="large-offset-2">' . __( 'Crop', 'rtmedia' ) . '</span></h4>';
|
766 |
+
echo '</div>';
|
767 |
|
768 |
//body
|
769 |
$even = 0;
|
770 |
foreach ( $render_data as $parent_key => $section ) {
|
771 |
+
if ( ++$even % 2 ){
|
772 |
echo '<div class="row rt-odd">';
|
773 |
} else {
|
774 |
echo '<div class="row rt-even">';
|
784 |
echo '<div class="columns large-6">';
|
785 |
foreach ( $entities as $entity ) {
|
786 |
$args = array(
|
787 |
+
'key' => 'defaultSizes_' . $parent_key . '_' . $entity['title'],
|
788 |
);
|
789 |
foreach ( $entity as $child_key => $value ) {
|
790 |
+
if ( 'title' != $child_key ){
|
791 |
+
$args[ $child_key ] = $value;
|
792 |
}
|
793 |
}
|
794 |
self::dimensions( $args );
|
800 |
echo '</div>';
|
801 |
$options = $rtmedia->options;
|
802 |
$render_video_thumb = array(
|
803 |
+
'title' => __( 'Number of thumbnails to generate on video upload', 'rtmedia' ),
|
804 |
+
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
805 |
+
'args' => array(
|
806 |
+
'key' => 'general_videothumbs',
|
807 |
+
'value' => $options['general_videothumbs'],
|
808 |
+
'class' => array( 'rtmedia-setting-text-box' ),
|
809 |
+
'desc' => __( ' If you choose more than 1 thumbnail, your users will be able to change thumbnail by going to video \'edit\' section. Maximum value is 10.', 'rtmedia' ),
|
810 |
+
'min' => 1,
|
811 |
+
'max' => 10,
|
812 |
+
)
|
813 |
+
);
|
814 |
?>
|
815 |
<div class="postbox metabox-holder">
|
816 |
+
<h3 class="hndle"><span>Encoding Settings</span></h3>
|
817 |
</div>
|
818 |
<div class="row section">
|
819 |
+
<div class="columns large-9">
|
820 |
+
<?php echo $render_video_thumb['title']; ?>
|
821 |
+
</div>
|
822 |
+
<div class="columns large-3">
|
823 |
+
<?php call_user_func( $render_video_thumb['callback'], $render_video_thumb['args'] ); ?>
|
824 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $render_video_thumb['args']['desc'] ) ) ? $render_video_thumb['args']['desc'] : 'NA'; ?>">
|
825 |
+
<i class="rtmicon-info-circle"></i>
|
826 |
+
</span>
|
827 |
+
</div>
|
828 |
</div>
|
829 |
+
<?php
|
830 |
}
|
831 |
|
832 |
+
/**
|
833 |
* Define custom css content.
|
834 |
*
|
835 |
* @access static
|
836 |
+
*
|
837 |
* @param void
|
838 |
+
*
|
839 |
* @return void
|
840 |
*/
|
841 |
+
public static function custom_css_content(){
|
842 |
+
global $rtmedia;
|
843 |
+
$options = self::extract_settings( 'styles', $rtmedia->options );
|
844 |
+
$render_data = self::custom_css_render_options( $options );
|
845 |
+
?>
|
846 |
+
<div class="postbox metabox-holder">
|
847 |
+
<h3 class="hndle"><span>Custom CSS settings</span></h3>
|
848 |
+
</div>
|
849 |
+
<?php
|
850 |
+
echo '<div class="large-12">';
|
851 |
+
foreach ( $render_data as $option ) {
|
852 |
+
?>
|
853 |
+
|
854 |
+
<div class="row section">
|
855 |
+
<?php if ( 'styles_custom' == $option['args']['key'] ){ ?>
|
856 |
+
<div class="columns large-12 rtm-custom-css">
|
857 |
+
<strong
|
858 |
+
class="<?php echo $option['args']['key']; ?>"><?php echo $option['title']; ?></strong>
|
859 |
+
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
860 |
+
<div><?php _e( "If you want to add some custom CSS code to the plugin and don't want to modify any files, then it's a good place to enter your code at this field." ); ?></div>
|
861 |
+
</div>
|
862 |
+
<?php } else { ?>
|
863 |
+
<div class="columns large-6">
|
864 |
+
<strong class="<?php echo $option['args']['key']; ?>"><?php echo $option['title']; ?></strong>
|
865 |
+
</div>
|
866 |
+
<div class="columns large-6">
|
867 |
+
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
868 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
869 |
+
<i class="rtmicon-info-circle"></i>
|
870 |
+
</span>
|
871 |
+
</div>
|
872 |
+
<?php } ?>
|
873 |
+
</div>
|
874 |
+
<?php
|
875 |
+
}
|
876 |
+
echo '</div>';
|
877 |
+
|
878 |
+
}
|
879 |
|
880 |
/**
|
881 |
* Render custom css options.
|
882 |
*
|
883 |
* @access static
|
884 |
+
*
|
885 |
* @param array $options
|
886 |
+
*
|
887 |
* @return array $render
|
888 |
*/
|
889 |
+
static function custom_css_render_options( $options ){
|
890 |
+
global $rtmedia;
|
891 |
|
892 |
+
$render = array(
|
893 |
+
'disable_styles' => array(
|
894 |
+
'title' => __( 'rtMedia default styles', 'rtmedia' ),
|
895 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
896 |
'args' => array(
|
897 |
'id' => 'rtmedia-disable-styles',
|
898 |
'key' => 'styles_enabled',
|
899 |
'value' => $options['styles_enabled'],
|
900 |
+
'desc' => __( 'Load default rtMedia styles. You need to write your own style for rtMedia if you disable it.', 'rtmedia' ),
|
901 |
+
)
|
902 |
+
),
|
903 |
+
'custom_styles' => array(
|
904 |
+
'title' => __( 'Paste your CSS code', 'rtmedia' ),
|
905 |
+
'callback' => array( 'RTMediaFormHandler', 'textarea' ),
|
906 |
'args' => array(
|
907 |
'id' => 'rtmedia-custom-css',
|
908 |
'key' => 'styles_custom',
|
909 |
'value' => stripcslashes( $options['styles_custom'] ),
|
910 |
+
'desc' => __( 'Custom rtMedia CSS container', 'rtmedia' ),
|
911 |
+
)
|
912 |
+
)
|
913 |
+
);
|
914 |
|
915 |
+
return $render;
|
916 |
+
}
|
917 |
|
918 |
/**
|
919 |
* Render privacy options.
|
920 |
*
|
921 |
* @access static
|
922 |
+
*
|
923 |
* @param array $options
|
924 |
+
*
|
925 |
* @return array $render
|
926 |
*/
|
927 |
+
static function privacy_render_options( $options ){
|
928 |
global $rtmedia;
|
929 |
|
930 |
$render = array(
|
931 |
+
'enable' => array(
|
932 |
+
'title' => __( 'Enable privacy', 'rtmedia' ),
|
933 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
934 |
'args' => array(
|
935 |
'id' => 'rtmedia-privacy-enable',
|
936 |
'key' => 'privacy_enabled',
|
937 |
'value' => $options['privacy_enabled'],
|
938 |
+
'desc' => __( 'Enable privacy in rtMedia', 'rtmedia' ),
|
939 |
)
|
940 |
),
|
941 |
+
'default' => array(
|
942 |
+
'title' => __( 'Default privacy', 'rtmedia' ),
|
943 |
+
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
944 |
'args' => array(
|
945 |
'key' => 'privacy_default',
|
946 |
'radios' => $rtmedia->privacy_settings['levels'],
|
947 |
'default' => $options['privacy_default'],
|
948 |
+
'desc' => __( 'Set default privacy for media', 'rtmedia' ),
|
949 |
),
|
950 |
),
|
951 |
'user_override' => array(
|
952 |
+
'title' => __( 'Allow users to set privacy for their content', 'rtmedia' ),
|
953 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
954 |
'args' => array(
|
955 |
'key' => 'privacy_userOverride',
|
956 |
'value' => $options['privacy_userOverride'],
|
957 |
+
'desc' => __( 'If you choose this, user will be able to change privacy of their own uploads.', 'rtmedia' ),
|
958 |
),
|
959 |
+
'after_content' => __( 'For group uploads, BuddyPress groups privacy is used.', 'rtmedia' ),
|
960 |
+
),
|
961 |
);
|
962 |
|
963 |
return $render;
|
967 |
* Render privacy content.
|
968 |
*
|
969 |
* @access static
|
970 |
+
*
|
971 |
* @param void
|
972 |
+
*
|
973 |
* @return void
|
974 |
*/
|
975 |
+
public static function privacy_content(){
|
976 |
global $rtmedia;
|
977 |
$options = self::extract_settings( 'privacy', $rtmedia->options );
|
978 |
|
979 |
$render_data = self::privacy_render_options( $options );
|
980 |
?>
|
981 |
+
<div class="postbox metabox-holder">
|
982 |
<h3 class="hndle"><span>Privacy Settings</span></h3>
|
983 |
+
</div>
|
984 |
<?php
|
985 |
echo '<div class="large-12">';
|
986 |
+
foreach ( $render_data as $key => $privacy ) {
|
987 |
+
echo '<div class="row section">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
988 |
?>
|
989 |
+
<div class="columns large-6">
|
990 |
+
<?php echo $privacy['title'] ?>
|
991 |
+
</div>
|
992 |
+
<?php
|
993 |
+
echo '<div class="columns large-6">';
|
994 |
+
if ( 'enable' != $key ){
|
995 |
+
call_user_func( $privacy['callback'], array_merge_recursive( $privacy['args'], array( 'class' => array( 'privacy-driven-disable' ) ) ) );
|
996 |
+
} else {
|
997 |
+
call_user_func( $privacy['callback'], $privacy['args'] );
|
998 |
+
}
|
999 |
+
?>
|
1000 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $privacy['args']['desc'] ) ) ? $privacy['args']['desc'] : 'NA'; ?>">
|
1001 |
+
<i class="rtmicon-info-circle"></i>
|
1002 |
+
</span>
|
1003 |
+
<?php
|
1004 |
+
echo '</div>';
|
1005 |
+
echo '</div>';
|
1006 |
+
|
1007 |
+
if ( isset( $privacy['after_content'] ) ){
|
1008 |
+
?>
|
1009 |
<div class="row">
|
1010 |
+
<div class="columns large-12">
|
1011 |
+
<p class="rtmedia-info rtmedia-admin-notice">
|
1012 |
+
<?php echo $privacy['after_content']; ?>
|
1013 |
+
</p>
|
1014 |
+
</div>
|
1015 |
</div>
|
1016 |
<?php
|
|
|
1017 |
}
|
1018 |
+
}
|
1019 |
echo '</div>';
|
1020 |
}
|
1021 |
|
1023 |
* Render buddypress options.
|
1024 |
*
|
1025 |
* @access static
|
1026 |
+
*
|
1027 |
* @param array $options
|
1028 |
+
*
|
1029 |
* @return array $render
|
1030 |
*/
|
1031 |
+
static function buddypress_render_options( $options ){
|
1032 |
$render = array(
|
1033 |
+
'rtmedia-enable-on-profile' => array(
|
1034 |
'title' => __( 'Enable media in profile', 'rtmedia' ),
|
1035 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1036 |
'args' => array(
|
1037 |
'key' => 'buddypress_enableOnProfile',
|
1038 |
'value' => $options['buddypress_enableOnProfile'],
|
1039 |
+
'desc' => __( 'Enable Media on BuddyPress Profile', 'rtmedia' ),
|
1040 |
+
),
|
1041 |
),
|
1042 |
+
'rtmedia-enable-on-group' => array(
|
1043 |
'title' => __( 'Enable media in group', 'rtmedia' ),
|
1044 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1045 |
'args' => array(
|
1046 |
'key' => 'buddypress_enableOnGroup',
|
1047 |
'value' => $options['buddypress_enableOnGroup'],
|
1048 |
+
'desc' => __( 'Enable Media on BuddyPress Groups', 'rtmedia' ),
|
1049 |
+
),
|
1050 |
),
|
1051 |
+
'rtmedia-enable-on-activity' => array(
|
1052 |
'title' => __( 'Allow upload from activity stream', 'rtmedia' ),
|
1053 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1054 |
'args' => array(
|
1055 |
'key' => 'buddypress_enableOnActivity',
|
1056 |
'value' => $options['buddypress_enableOnActivity'],
|
1057 |
'desc' => __( 'Allow upload using status update box present on activity stream page', 'rtmedia' ),
|
1058 |
+
'id' => 'rtmedia-bp-enable-activity',
|
1059 |
+
),
|
1060 |
),
|
1061 |
'rtmedia-activity-feed-limit' => array(
|
1062 |
'title' => __( 'Number of media items to show in activity stream', 'rtmedia' ),
|
1066 |
'value' => $options['buddypress_limitOnActivity'],
|
1067 |
'desc' => __( 'With bulk uploads activity stream may get flooded. You can control maximum number of medias/files per activity. This limit will not affect the actual number of uploads. Only display. <em>0</em> means unlimited.', 'rtmedia' ),
|
1068 |
'class' => array( 'rtmedia-setting-text-box rtmedia-bp-activity-setting' ),
|
1069 |
+
'min' => 0,
|
1070 |
+
),
|
1071 |
+
),
|
1072 |
);
|
1073 |
|
1074 |
return $render;
|
1078 |
* Define buddypress content.
|
1079 |
*
|
1080 |
* @access static
|
1081 |
+
*
|
1082 |
* @param void
|
1083 |
+
*
|
1084 |
* @return void
|
1085 |
*/
|
1086 |
public static function buddypress_content() {
|
1087 |
global $rtmedia;
|
1088 |
+
|
1089 |
$options = self::extract_settings( 'buddypress', $rtmedia->options );
|
1090 |
+
?>
|
1091 |
<div class="postbox metabox-holder">
|
1092 |
+
<h3 class="hndle"><span>Integration With BuddyPress Features</span></h3>
|
1093 |
+
<?php
|
1094 |
$render_data = self::buddypress_render_options( $options );
|
1095 |
|
1096 |
echo '<div class="large-12">';
|
1097 |
+
foreach ( $render_data as $option ) {
|
1098 |
+
?>
|
1099 |
<div class="row section">
|
1100 |
<div class="columns large-9">
|
1101 |
+
<?php echo $option['title']; ?>
|
1102 |
</div>
|
1103 |
<div class="columns large-3">
|
1104 |
+
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
1105 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
1106 |
+
<i class="rtmicon-info-circle"></i>
|
1107 |
+
</span>
|
1108 |
</div>
|
1109 |
</div>
|
1110 |
+
<?php
|
1111 |
+
}
|
1112 |
+
echo '</div>';
|
1113 |
echo '</div>';
|
1114 |
+
?>
|
1115 |
+
<div class="postbox metabox-holder">
|
1116 |
+
<h3 class="hndle"><span>Album Settings</span></h3>
|
1117 |
+
<?php
|
1118 |
+
$options = $rtmedia->options;
|
1119 |
+
$render_options = array(
|
|
|
1120 |
'general_enableAlbums' => array(
|
1121 |
+
'title' => __( 'Organize media into albums', 'rtmedia' ),
|
1122 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1123 |
+
'args' => array(
|
1124 |
+
'id' => 'rtmedia-album-enable',
|
1125 |
+
'key' => 'general_enableAlbums',
|
1126 |
+
'value' => $options['general_enableAlbums'],
|
1127 |
+
'desc' => __( 'This will add \'album\' tab to BuddyPress profile and group depending on ^above^ settings.', 'rtmedia' ),
|
1128 |
+
),
|
1129 |
),
|
1130 |
+
);
|
1131 |
+
$render_options = apply_filters( 'rtmedia_album_control_setting', $render_options, $options );
|
1132 |
+
foreach ( $render_options as $tab => $option ) {
|
1133 |
+
?>
|
1134 |
+
<div class="row section">
|
1135 |
+
<div class="columns large-9">
|
1136 |
<?php echo $option['title']; ?>
|
1137 |
+
</div>
|
1138 |
+
<div class="columns large-3">
|
1139 |
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
1140 |
+
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
1141 |
+
<i class="rtmicon-info-circle"></i>
|
1142 |
+
</span>
|
1143 |
+
</div>
|
1144 |
+
</div>
|
1145 |
+
<?php
|
1146 |
+
}
|
1147 |
+
?>
|
1148 |
</div>
|
1149 |
+
<?php
|
1150 |
+
do_action( 'rtmedia_buddypress_setting_content' );
|
1151 |
}
|
1152 |
|
1153 |
/**
|
1154 |
* Define rtForm settings tabs content.
|
1155 |
*
|
1156 |
* @access static
|
1157 |
+
*
|
1158 |
+
* @param type $page
|
1159 |
* @param array $sub_tabs
|
1160 |
+
*
|
1161 |
* @return void
|
1162 |
*/
|
1163 |
+
public static function rtForm_settings_tabs_content( $page, $sub_tabs ){
|
1164 |
+
// $rtmedia_admin_ui_handler = "<div class='section-container auto' data-options='deep_linking: true' data-section=''>";
|
1165 |
+
// echo "<div class='clearfix rtm-settings-tab-container'>";
|
1166 |
+
$rtmedia_admin_ui_handler = "<div class='clearfix rtm-settings-tab-container horizontal-tabs'><dl class='tabs' data-tab>";
|
1167 |
+
$rtmedia_admin_ui_handler = apply_filters( 'rtmedia_admin_ui_handler_filter', $rtmedia_admin_ui_handler );
|
1168 |
+
echo $rtmedia_admin_ui_handler;
|
1169 |
+
$i = 1;
|
1170 |
+
$sub_tabs = apply_filters( 'rtmedia_pro_settings_tabs_content', $sub_tabs );
|
1171 |
ksort( $sub_tabs );
|
1172 |
foreach ( $sub_tabs as $tab ) {
|
1173 |
+
$active_class = '';
|
1174 |
+
if ( 1 == $i ){
|
1175 |
+
$active_class = 'active';
|
1176 |
}
|
1177 |
+
$i ++;
|
1178 |
+
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
1179 |
+
$icon = '<i class="' . $tab['icon'] . ' rtmicon-fw"></i>';
|
1180 |
}
|
1181 |
+
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>';
|
1182 |
}
|
1183 |
+
echo '</dl>';
|
1184 |
+
?>
|
1185 |
+
|
1186 |
+
<?php
|
1187 |
+
$rtmedia_admin_tab_content_handler = "<div class='tabs-content'>";
|
1188 |
+
$rtmedia_admin_tab_content_handler = apply_filters( 'rtmedia_admin_tab_content_handler', $rtmedia_admin_tab_content_handler );
|
1189 |
+
echo $rtmedia_admin_tab_content_handler;
|
1190 |
+
$k = 1;
|
1191 |
+
foreach ( $sub_tabs as $tab ) {
|
1192 |
+
$active_class = '';
|
1193 |
+
if ( 1 == $k ){
|
1194 |
+
$active_class = ' active';
|
1195 |
+
}
|
1196 |
+
$k ++;
|
1197 |
+
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
1198 |
+
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
1199 |
+
}
|
1200 |
+
$tab_without_hash = explode( '#', $tab['href'] );
|
1201 |
+
$tab_without_hash = $tab_without_hash[1];
|
1202 |
+
echo '<div class="content' . $active_class . '" id="' . $tab_without_hash . '">';
|
1203 |
+
call_user_func( $tab['callback'], $page );
|
1204 |
+
echo '</div>';
|
1205 |
+
}
|
1206 |
+
echo '</div>';
|
1207 |
+
?>
|
1208 |
+
</div>
|
1209 |
+
<div class="clearfix"></div>
|
1210 |
+
<?php
|
1211 |
}
|
1212 |
|
1213 |
/**
|
1214 |
* Define rtForm do_settings_fields.
|
1215 |
*
|
1216 |
* @access static
|
1217 |
+
*
|
1218 |
* @param type $page
|
1219 |
* @param type $section
|
1220 |
+
*
|
1221 |
* @return void
|
1222 |
*/
|
1223 |
+
public static function rtForm_do_settings_fields( $page, $section ){
|
1224 |
global $wp_settings_fields;
|
1225 |
|
1226 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section ] ) ){
|
1227 |
return;
|
1228 |
}
|
1229 |
|
1230 |
+
foreach ( (array) $wp_settings_fields[ $page ][ $section ] as $field ) {
|
1231 |
echo '<div class="row">';
|
1232 |
echo '<div class="large-11 columns">';
|
1233 |
|
1234 |
if ( isset( $field['args']['label_for'] ) && ! empty( $field['args']['label_for'] ) ){
|
1235 |
call_user_func( $field['callback'], array_merge( $field['args'], array( 'label' => $field['args']['label_for'] ) ) );
|
|
|
|
|
1236 |
} else {
|
1237 |
+
if ( isset( $field['title'] ) && ! empty( $field['title'] ) ){
|
1238 |
+
call_user_func( $field['callback'], array_merge( $field['args'], array( 'label' => $field['title'] ) ) );
|
1239 |
+
} else {
|
1240 |
+
call_user_func( $field['callback'], $field['args'] );
|
1241 |
+
}
|
1242 |
}
|
1243 |
echo '</div>';
|
1244 |
echo '</div>';
|
app/assets/css/main.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.rtm-link-button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button,#rtm-media-options ul li .rtmedia-action-buttons,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons{border:none;background:none;text-decoration:none}.rtm-top-notch,.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info:before,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before{content:'';border-width:5px;border-style:inset inset solid;display:block;position:absolute;border-color:transparent transparent #edeff4}.rtm-primary-button,.rtmedia-container .drag-drop .start-media-upload,.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress .rtmedia-container .rtmedia-uploader .drag-drop .start-media-upload,#buddypress .rtmedia-activity-container .rtmedia-uploader .drag-drop .start-media-upload{background-color:#3475BA;border-radius:5px 5px 5px 5px;text-transform:uppercase;box-shadow:0 0 0 rgba(255,255,255,0) inset;transition:background-color 300ms ease-out 0s;color:white;border:none;padding:10px 20px;background-image:none}.rtm-primary-button:hover,.rtmedia-container .drag-drop .start-media-upload:hover,.rtmedia-activity-container .drag-drop .start-media-upload:hover,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload:hover,#buddypress .rtmedia-container .rtmedia-uploader .drag-drop .start-media-upload:hover,#buddypress .rtmedia-activity-container .rtmedia-uploader .drag-drop .start-media-upload:hover{background-color:#306BAA}.rtm-primary-font-color{color:#3475ba}#rtmedia-add-media-button-post-update{float:left;margin-top:12px;margin-right:20px}.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{@import url("//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700");;padding:5px;margin:0;clear:left}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body,.rtmedia-container div,.rtmedia-activity-container div,#buddypress div.rtmedia-activity-container div,.rtmedia-container span,.rtmedia-activity-container span,#buddypress div.rtmedia-activity-container span,.rtmedia-container applet,.rtmedia-activity-container applet,#buddypress div.rtmedia-activity-container applet,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container iframe,.rtmedia-activity-container iframe,#buddypress div.rtmedia-activity-container iframe,.rtmedia-container h1,.rtmedia-activity-container h1,#buddypress div.rtmedia-activity-container h1,.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2,.rtmedia-container h3,.rtmedia-activity-container h3,#buddypress div.rtmedia-activity-container h3,.rtmedia-container h4,.rtmedia-activity-container h4,#buddypress div.rtmedia-activity-container h4,.rtmedia-container h5,.rtmedia-activity-container h5,#buddypress div.rtmedia-activity-container h5,.rtmedia-container h6,.rtmedia-activity-container h6,#buddypress div.rtmedia-activity-container h6,.rtmedia-container p,.rtmedia-activity-container p,#buddypress div.rtmedia-activity-container p,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote,.rtmedia-container pre,.rtmedia-activity-container pre,#buddypress div.rtmedia-activity-container pre,.rtmedia-container a,.rtmedia-activity-container a,#buddypress div.rtmedia-activity-container a,.rtmedia-container abbr,.rtmedia-activity-container abbr,#buddypress div.rtmedia-activity-container abbr,.rtmedia-container acronym,.rtmedia-activity-container acronym,#buddypress div.rtmedia-activity-container acronym,.rtmedia-container address,.rtmedia-activity-container address,#buddypress div.rtmedia-activity-container address,.rtmedia-container big,.rtmedia-activity-container big,#buddypress div.rtmedia-activity-container big,.rtmedia-container cite,.rtmedia-activity-container cite,#buddypress div.rtmedia-activity-container cite,.rtmedia-container code,.rtmedia-activity-container code,#buddypress div.rtmedia-activity-container code,.rtmedia-container del,.rtmedia-activity-container del,#buddypress div.rtmedia-activity-container del,.rtmedia-container dfn,.rtmedia-activity-container dfn,#buddypress div.rtmedia-activity-container dfn,.rtmedia-container em,.rtmedia-activity-container em,#buddypress div.rtmedia-activity-container em,.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container ins,.rtmedia-activity-container ins,#buddypress div.rtmedia-activity-container ins,.rtmedia-container kbd,.rtmedia-activity-container kbd,#buddypress div.rtmedia-activity-container kbd,.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container s,.rtmedia-activity-container s,#buddypress div.rtmedia-activity-container s,.rtmedia-container samp,.rtmedia-activity-container samp,#buddypress div.rtmedia-activity-container samp,.rtmedia-container small,.rtmedia-activity-container small,#buddypress div.rtmedia-activity-container small,.rtmedia-container strike,.rtmedia-activity-container strike,#buddypress div.rtmedia-activity-container strike,.rtmedia-container strong,.rtmedia-activity-container strong,#buddypress div.rtmedia-activity-container strong,.rtmedia-container sub,.rtmedia-activity-container sub,#buddypress div.rtmedia-activity-container sub,.rtmedia-container sup,.rtmedia-activity-container sup,#buddypress div.rtmedia-activity-container sup,.rtmedia-container tt,.rtmedia-activity-container tt,#buddypress div.rtmedia-activity-container tt,.rtmedia-container var,.rtmedia-activity-container var,#buddypress div.rtmedia-activity-container var,.rtmedia-container b,.rtmedia-activity-container b,#buddypress div.rtmedia-activity-container b,.rtmedia-container u,.rtmedia-activity-container u,#buddypress div.rtmedia-activity-container u,.rtmedia-container i,.rtmedia-activity-container i,#buddypress div.rtmedia-activity-container i,.rtmedia-container center,.rtmedia-activity-container center,#buddypress div.rtmedia-activity-container center,.rtmedia-container dl,.rtmedia-activity-container dl,#buddypress div.rtmedia-activity-container dl,.rtmedia-container dt,.rtmedia-activity-container dt,#buddypress div.rtmedia-activity-container dt,.rtmedia-container dd,.rtmedia-activity-container dd,#buddypress div.rtmedia-activity-container dd,.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul,.rtmedia-container li,.rtmedia-activity-container li,#buddypress div.rtmedia-activity-container li,.rtmedia-container fieldset,.rtmedia-activity-container fieldset,#buddypress div.rtmedia-activity-container fieldset,.rtmedia-container form,.rtmedia-activity-container form,#buddypress div.rtmedia-activity-container form,.rtmedia-container label,.rtmedia-activity-container label,#buddypress div.rtmedia-activity-container label,.rtmedia-container legend,.rtmedia-activity-container legend,#buddypress div.rtmedia-activity-container legend,.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table,.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container tbody,.rtmedia-activity-container tbody,#buddypress div.rtmedia-activity-container tbody,.rtmedia-container tfoot,.rtmedia-activity-container tfoot,#buddypress div.rtmedia-activity-container tfoot,.rtmedia-container thead,.rtmedia-activity-container thead,#buddypress div.rtmedia-activity-container thead,.rtmedia-container tr,.rtmedia-activity-container tr,#buddypress div.rtmedia-activity-container tr,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td,.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container canvas,.rtmedia-activity-container canvas,#buddypress div.rtmedia-activity-container canvas,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container output,.rtmedia-activity-container output,#buddypress div.rtmedia-activity-container output,.rtmedia-container ruby,.rtmedia-activity-container ruby,#buddypress div.rtmedia-activity-container ruby,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary,.rtmedia-container time,.rtmedia-activity-container time,#buddypress div.rtmedia-activity-container time,.rtmedia-container mark,.rtmedia-activity-container mark,#buddypress div.rtmedia-activity-container mark,.rtmedia-container audio,.rtmedia-activity-container audio,#buddypress div.rtmedia-activity-container audio,.rtmedia-container video,.rtmedia-activity-container video,#buddypress div.rtmedia-activity-container video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html{line-height:1}.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul{list-style:none}.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table{border-collapse:collapse;border-spacing:0}.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td{text-align:left;font-weight:normal;vertical-align:middle}.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote{quotes:none}.rtmedia-container q:before,.rtmedia-activity-container q:before,#buddypress div.rtmedia-activity-container q:before,.rtmedia-container q:after,.rtmedia-activity-container q:after,#buddypress div.rtmedia-activity-container q:after,.rtmedia-container blockquote:before,.rtmedia-activity-container blockquote:before,#buddypress div.rtmedia-activity-container blockquote:before,.rtmedia-container blockquote:after,.rtmedia-activity-container blockquote:after,#buddypress div.rtmedia-activity-container blockquote:after{content:"";content:none}.rtmedia-container a img,.rtmedia-activity-container a img,#buddypress div.rtmedia-activity-container a img{border:none}.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container main,.rtmedia-activity-container main,#buddypress div.rtmedia-activity-container main,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary{display:block}.rtmedia-container meta.foundation-mq-small,.rtmedia-activity-container meta.foundation-mq-small,#buddypress div.rtmedia-activity-container meta.foundation-mq-small{font-family:"/only screen and (max-width: 40em)/";width:0em}.rtmedia-container meta.foundation-mq-medium,.rtmedia-activity-container meta.foundation-mq-medium,#buddypress div.rtmedia-activity-container meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.063em) and (max-width:64em)/";width:40.063em}.rtmedia-container meta.foundation-mq-large,.rtmedia-activity-container meta.foundation-mq-large,#buddypress div.rtmedia-activity-container meta.foundation-mq-large{font-family:"/only screen and (min-width:64.063em)/";width:64.063em}.rtmedia-container meta.foundation-mq-xlarge,.rtmedia-activity-container meta.foundation-mq-xlarge,#buddypress div.rtmedia-activity-container meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.063em)/";width:90.063em}.rtmedia-container meta.foundation-mq-xxlarge,.rtmedia-activity-container meta.foundation-mq-xxlarge,#buddypress div.rtmedia-activity-container meta.foundation-mq-xxlarge{font-family:"/only screen and (min-width:120.063em)/";width:120.063em}.rtmedia-container *,.rtmedia-activity-container *,#buddypress div.rtmedia-activity-container *,.rtmedia-container *:before,.rtmedia-activity-container *:before,#buddypress div.rtmedia-activity-container *:before,.rtmedia-container *:after,.rtmedia-activity-container *:after,#buddypress div.rtmedia-activity-container *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{font-size:100%}.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{background:#fff;color:#222;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default}.rtmedia-container a:hover,.rtmedia-activity-container a:hover,#buddypress div.rtmedia-activity-container a:hover{cursor:pointer}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{max-width:100%;height:auto}.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{height:100%}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{-ms-interpolation-mode:bicubic}.rtmedia-container #map_canvas img,.rtmedia-activity-container #map_canvas img,.rtmedia-container #map_canvas embed,.rtmedia-activity-container #map_canvas embed,.rtmedia-container #map_canvas object,.rtmedia-activity-container #map_canvas object,.rtmedia-container .map_canvas img,.rtmedia-activity-container .map_canvas img,#buddypress div.rtmedia-activity-container .map_canvas img,.rtmedia-container .map_canvas embed,.rtmedia-activity-container .map_canvas embed,#buddypress div.rtmedia-activity-container .map_canvas embed,.rtmedia-container .map_canvas object,.rtmedia-activity-container .map_canvas object,#buddypress div.rtmedia-activity-container .map_canvas object{max-width:none !important}.rtmedia-container .left,.rtmedia-activity-container .left,#buddypress div.rtmedia-activity-container .left{float:left !important}.rtmedia-container .right,.rtmedia-activity-container .right,#buddypress div.rtmedia-activity-container .right{float:right !important}.rtmedia-container .clearfix,.rtmedia-activity-container .clearfix,#buddypress div.rtmedia-activity-container .clearfix{*zoom:1}.rtmedia-container .clearfix:before,.rtmedia-activity-container .clearfix:before,#buddypress div.rtmedia-activity-container .clearfix:before,.rtmedia-container .clearfix:after,.rtmedia-activity-container .clearfix:after,#buddypress div.rtmedia-activity-container .clearfix:after{content:" ";display:table}.rtmedia-container .clearfix:after,.rtmedia-activity-container .clearfix:after,#buddypress div.rtmedia-activity-container .clearfix:after{clear:both}.rtmedia-container .text-left,.rtmedia-activity-container .text-left,#buddypress div.rtmedia-activity-container .text-left{text-align:left !important}.rtmedia-container .text-right,.rtmedia-activity-container .text-right,#buddypress div.rtmedia-activity-container .text-right{text-align:right !important}.rtmedia-container .text-center,.rtmedia-activity-container .text-center,#buddypress div.rtmedia-activity-container .text-center{text-align:center !important}.rtmedia-container .text-justify,.rtmedia-activity-container .text-justify,#buddypress div.rtmedia-activity-container .text-justify{text-align:justify !important}.rtmedia-container .hide,.rtmedia-activity-container .hide,#buddypress div.rtmedia-activity-container .hide{display:none}.rtmedia-container .antialiased,.rtmedia-activity-container .antialiased,#buddypress div.rtmedia-activity-container .antialiased{-webkit-font-smoothing:antialiased}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{display:inline-block;vertical-align:middle}.rtmedia-container textarea,.rtmedia-activity-container textarea,#buddypress div.rtmedia-activity-container textarea{height:auto;min-height:50px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5rem;*zoom:1}.rtmedia-container .row:before,.rtmedia-activity-container .row:before,#buddypress div.rtmedia-activity-container .row:before,.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{content:" ";display:table}.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{clear:both}.rtmedia-container .row.collapse>.column,.rtmedia-activity-container .row.collapse>.column,#buddypress div.rtmedia-activity-container .row.collapse>.column,.rtmedia-container .row.collapse>.columns,.rtmedia-activity-container .row.collapse>.columns,#buddypress div.rtmedia-activity-container .row.collapse>.columns{position:relative;padding-left:0;padding-right:0;float:left}.rtmedia-container .row.collapse .row,.rtmedia-activity-container .row.collapse .row,#buddypress div.rtmedia-activity-container .row.collapse .row{margin-left:0;margin-right:0}.rtmedia-container .row .row,.rtmedia-activity-container .row .row,#buddypress div.rtmedia-activity-container .row .row{width:auto;margin-left:-0.9375rem;margin-right:-0.9375rem;margin-top:0;margin-bottom:0;max-width:none;*zoom:1}.rtmedia-container .row .row:before,.rtmedia-activity-container .row .row:before,#buddypress div.rtmedia-activity-container .row .row:before,.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{content:" ";display:table}.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{clear:both}.rtmedia-container .row .row.collapse,.rtmedia-activity-container .row .row.collapse,#buddypress div.rtmedia-activity-container .row .row.collapse{width:auto;margin:0;max-width:none;*zoom:1}.rtmedia-container .row .row.collapse:before,.rtmedia-activity-container .row .row.collapse:before,#buddypress div.rtmedia-activity-container .row .row.collapse:before,.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{content:" ";display:table}.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{clear:both}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;width:100%;float:left}@media only screen{.rtmedia-container .small-push-1,.rtmedia-activity-container .small-push-1,#buddypress div.rtmedia-activity-container .small-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .small-pull-1,.rtmedia-activity-container .small-pull-1,#buddypress div.rtmedia-activity-container .small-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .small-push-2,.rtmedia-activity-container .small-push-2,#buddypress div.rtmedia-activity-container .small-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .small-pull-2,.rtmedia-activity-container .small-pull-2,#buddypress div.rtmedia-activity-container .small-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .small-push-3,.rtmedia-activity-container .small-push-3,#buddypress div.rtmedia-activity-container .small-push-3{position:relative;left:25%;right:auto}.rtmedia-container .small-pull-3,.rtmedia-activity-container .small-pull-3,#buddypress div.rtmedia-activity-container .small-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .small-push-4,.rtmedia-activity-container .small-push-4,#buddypress div.rtmedia-activity-container .small-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .small-pull-4,.rtmedia-activity-container .small-pull-4,#buddypress div.rtmedia-activity-container .small-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .small-push-5,.rtmedia-activity-container .small-push-5,#buddypress div.rtmedia-activity-container .small-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .small-pull-5,.rtmedia-activity-container .small-pull-5,#buddypress div.rtmedia-activity-container .small-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .small-push-6,.rtmedia-activity-container .small-push-6,#buddypress div.rtmedia-activity-container .small-push-6{position:relative;left:50%;right:auto}.rtmedia-container .small-pull-6,.rtmedia-activity-container .small-pull-6,#buddypress div.rtmedia-activity-container .small-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .small-push-7,.rtmedia-activity-container .small-push-7,#buddypress div.rtmedia-activity-container .small-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .small-pull-7,.rtmedia-activity-container .small-pull-7,#buddypress div.rtmedia-activity-container .small-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .small-push-8,.rtmedia-activity-container .small-push-8,#buddypress div.rtmedia-activity-container .small-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .small-pull-8,.rtmedia-activity-container .small-pull-8,#buddypress div.rtmedia-activity-container .small-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .small-push-9,.rtmedia-activity-container .small-push-9,#buddypress div.rtmedia-activity-container .small-push-9{position:relative;left:75%;right:auto}.rtmedia-container .small-pull-9,.rtmedia-activity-container .small-pull-9,#buddypress div.rtmedia-activity-container .small-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .small-push-10,.rtmedia-activity-container .small-push-10,#buddypress div.rtmedia-activity-container .small-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .small-pull-10,.rtmedia-activity-container .small-pull-10,#buddypress div.rtmedia-activity-container .small-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .small-push-11,.rtmedia-activity-container .small-push-11,#buddypress div.rtmedia-activity-container .small-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .small-pull-11,.rtmedia-activity-container .small-pull-11,#buddypress div.rtmedia-activity-container .small-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .small-1,.rtmedia-activity-container .small-1,#buddypress div.rtmedia-activity-container .small-1{position:relative;width:8.33333%}.rtmedia-container .small-2,.rtmedia-activity-container .small-2,#buddypress div.rtmedia-activity-container .small-2{position:relative;width:16.66667%}.rtmedia-container .small-3,.rtmedia-activity-container .small-3,#buddypress div.rtmedia-activity-container .small-3{position:relative;width:25%}.rtmedia-container .small-4,.rtmedia-activity-container .small-4,#buddypress div.rtmedia-activity-container .small-4{position:relative;width:33.33333%}.rtmedia-container .small-5,.rtmedia-activity-container .small-5,#buddypress div.rtmedia-activity-container .small-5{position:relative;width:41.66667%}.rtmedia-container .small-6,.rtmedia-activity-container .small-6,#buddypress div.rtmedia-activity-container .small-6{position:relative;width:50%}.rtmedia-container .small-7,.rtmedia-activity-container .small-7,#buddypress div.rtmedia-activity-container .small-7{position:relative;width:58.33333%}.rtmedia-container .small-8,.rtmedia-activity-container .small-8,#buddypress div.rtmedia-activity-container .small-8{position:relative;width:66.66667%}.rtmedia-container .small-9,.rtmedia-activity-container .small-9,#buddypress div.rtmedia-activity-container .small-9{position:relative;width:75%}.rtmedia-container .small-10,.rtmedia-activity-container .small-10,#buddypress div.rtmedia-activity-container .small-10{position:relative;width:83.33333%}.rtmedia-container .small-11,.rtmedia-activity-container .small-11,#buddypress div.rtmedia-activity-container .small-11{position:relative;width:91.66667%}.rtmedia-container .small-12,.rtmedia-activity-container .small-12,#buddypress div.rtmedia-activity-container .small-12{position:relative;width:100%}.rtmedia-container .small-offset-0,.rtmedia-activity-container .small-offset-0,#buddypress div.rtmedia-activity-container .small-offset-0{position:relative;margin-left:0%}.rtmedia-container .small-offset-1,.rtmedia-activity-container .small-offset-1,#buddypress div.rtmedia-activity-container .small-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .small-offset-2,.rtmedia-activity-container .small-offset-2,#buddypress div.rtmedia-activity-container .small-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .small-offset-3,.rtmedia-activity-container .small-offset-3,#buddypress div.rtmedia-activity-container .small-offset-3{position:relative;margin-left:25%}.rtmedia-container .small-offset-4,.rtmedia-activity-container .small-offset-4,#buddypress div.rtmedia-activity-container .small-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .small-offset-5,.rtmedia-activity-container .small-offset-5,#buddypress div.rtmedia-activity-container .small-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .small-offset-6,.rtmedia-activity-container .small-offset-6,#buddypress div.rtmedia-activity-container .small-offset-6{position:relative;margin-left:50%}.rtmedia-container .small-offset-7,.rtmedia-activity-container .small-offset-7,#buddypress div.rtmedia-activity-container .small-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .small-offset-8,.rtmedia-activity-container .small-offset-8,#buddypress div.rtmedia-activity-container .small-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .small-offset-9,.rtmedia-activity-container .small-offset-9,#buddypress div.rtmedia-activity-container .small-offset-9{position:relative;margin-left:75%}.rtmedia-container .small-offset-10,.rtmedia-activity-container .small-offset-10,#buddypress div.rtmedia-activity-container .small-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.small-centered,.rtmedia-activity-container .column.small-centered,#buddypress div.rtmedia-activity-container .column.small-centered,.rtmedia-container .columns.small-centered,.rtmedia-activity-container .columns.small-centered,#buddypress div.rtmedia-activity-container .columns.small-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.small-uncentered,.rtmedia-activity-container .column.small-uncentered,#buddypress div.rtmedia-activity-container .column.small-uncentered,.rtmedia-container .columns.small-uncentered,.rtmedia-activity-container .columns.small-uncentered,#buddypress div.rtmedia-activity-container .columns.small-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.small-uncentered.opposite,.rtmedia-activity-container .column.small-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.small-uncentered.opposite,.rtmedia-container .columns.small-uncentered.opposite,.rtmedia-activity-container .columns.small-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.small-uncentered.opposite{float:right !important}}@media only screen and (min-width: 40.063em){.rtmedia-container .medium-push-1,.rtmedia-activity-container .medium-push-1,#buddypress div.rtmedia-activity-container .medium-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .medium-pull-1,.rtmedia-activity-container .medium-pull-1,#buddypress div.rtmedia-activity-container .medium-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .medium-push-2,.rtmedia-activity-container .medium-push-2,#buddypress div.rtmedia-activity-container .medium-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .medium-pull-2,.rtmedia-activity-container .medium-pull-2,#buddypress div.rtmedia-activity-container .medium-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .medium-push-3,.rtmedia-activity-container .medium-push-3,#buddypress div.rtmedia-activity-container .medium-push-3{position:relative;left:25%;right:auto}.rtmedia-container .medium-pull-3,.rtmedia-activity-container .medium-pull-3,#buddypress div.rtmedia-activity-container .medium-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .medium-push-4,.rtmedia-activity-container .medium-push-4,#buddypress div.rtmedia-activity-container .medium-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .medium-pull-4,.rtmedia-activity-container .medium-pull-4,#buddypress div.rtmedia-activity-container .medium-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .medium-push-5,.rtmedia-activity-container .medium-push-5,#buddypress div.rtmedia-activity-container .medium-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .medium-pull-5,.rtmedia-activity-container .medium-pull-5,#buddypress div.rtmedia-activity-container .medium-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .medium-push-6,.rtmedia-activity-container .medium-push-6,#buddypress div.rtmedia-activity-container .medium-push-6{position:relative;left:50%;right:auto}.rtmedia-container .medium-pull-6,.rtmedia-activity-container .medium-pull-6,#buddypress div.rtmedia-activity-container .medium-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .medium-push-7,.rtmedia-activity-container .medium-push-7,#buddypress div.rtmedia-activity-container .medium-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .medium-pull-7,.rtmedia-activity-container .medium-pull-7,#buddypress div.rtmedia-activity-container .medium-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .medium-push-8,.rtmedia-activity-container .medium-push-8,#buddypress div.rtmedia-activity-container .medium-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .medium-pull-8,.rtmedia-activity-container .medium-pull-8,#buddypress div.rtmedia-activity-container .medium-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .medium-push-9,.rtmedia-activity-container .medium-push-9,#buddypress div.rtmedia-activity-container .medium-push-9{position:relative;left:75%;right:auto}.rtmedia-container .medium-pull-9,.rtmedia-activity-container .medium-pull-9,#buddypress div.rtmedia-activity-container .medium-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .medium-push-10,.rtmedia-activity-container .medium-push-10,#buddypress div.rtmedia-activity-container .medium-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .medium-pull-10,.rtmedia-activity-container .medium-pull-10,#buddypress div.rtmedia-activity-container .medium-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .medium-push-11,.rtmedia-activity-container .medium-push-11,#buddypress div.rtmedia-activity-container .medium-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .medium-pull-11,.rtmedia-activity-container .medium-pull-11,#buddypress div.rtmedia-activity-container .medium-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .medium-1,.rtmedia-activity-container .medium-1,#buddypress div.rtmedia-activity-container .medium-1{position:relative;width:8.33333%}.rtmedia-container .medium-2,.rtmedia-activity-container .medium-2,#buddypress div.rtmedia-activity-container .medium-2{position:relative;width:16.66667%}.rtmedia-container .medium-3,.rtmedia-activity-container .medium-3,#buddypress div.rtmedia-activity-container .medium-3{position:relative;width:25%}.rtmedia-container .medium-4,.rtmedia-activity-container .medium-4,#buddypress div.rtmedia-activity-container .medium-4{position:relative;width:33.33333%}.rtmedia-container .medium-5,.rtmedia-activity-container .medium-5,#buddypress div.rtmedia-activity-container .medium-5{position:relative;width:41.66667%}.rtmedia-container .medium-6,.rtmedia-activity-container .medium-6,#buddypress div.rtmedia-activity-container .medium-6{position:relative;width:50%}.rtmedia-container .medium-7,.rtmedia-activity-container .medium-7,#buddypress div.rtmedia-activity-container .medium-7{position:relative;width:58.33333%}.rtmedia-container .medium-8,.rtmedia-activity-container .medium-8,#buddypress div.rtmedia-activity-container .medium-8{position:relative;width:66.66667%}.rtmedia-container .medium-9,.rtmedia-activity-container .medium-9,#buddypress div.rtmedia-activity-container .medium-9{position:relative;width:75%}.rtmedia-container .medium-10,.rtmedia-activity-container .medium-10,#buddypress div.rtmedia-activity-container .medium-10{position:relative;width:83.33333%}.rtmedia-container .medium-11,.rtmedia-activity-container .medium-11,#buddypress div.rtmedia-activity-container .medium-11{position:relative;width:91.66667%}.rtmedia-container .medium-12,.rtmedia-activity-container .medium-12,#buddypress div.rtmedia-activity-container .medium-12{position:relative;width:100%}.rtmedia-container .medium-offset-0,.rtmedia-activity-container .medium-offset-0,#buddypress div.rtmedia-activity-container .medium-offset-0{position:relative;margin-left:0%}.rtmedia-container .medium-offset-1,.rtmedia-activity-container .medium-offset-1,#buddypress div.rtmedia-activity-container .medium-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .medium-offset-2,.rtmedia-activity-container .medium-offset-2,#buddypress div.rtmedia-activity-container .medium-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .medium-offset-3,.rtmedia-activity-container .medium-offset-3,#buddypress div.rtmedia-activity-container .medium-offset-3{position:relative;margin-left:25%}.rtmedia-container .medium-offset-4,.rtmedia-activity-container .medium-offset-4,#buddypress div.rtmedia-activity-container .medium-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .medium-offset-5,.rtmedia-activity-container .medium-offset-5,#buddypress div.rtmedia-activity-container .medium-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .medium-offset-6,.rtmedia-activity-container .medium-offset-6,#buddypress div.rtmedia-activity-container .medium-offset-6{position:relative;margin-left:50%}.rtmedia-container .medium-offset-7,.rtmedia-activity-container .medium-offset-7,#buddypress div.rtmedia-activity-container .medium-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .medium-offset-8,.rtmedia-activity-container .medium-offset-8,#buddypress div.rtmedia-activity-container .medium-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .medium-offset-9,.rtmedia-activity-container .medium-offset-9,#buddypress div.rtmedia-activity-container .medium-offset-9{position:relative;margin-left:75%}.rtmedia-container .medium-offset-10,.rtmedia-activity-container .medium-offset-10,#buddypress div.rtmedia-activity-container .medium-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.medium-centered,.rtmedia-activity-container .column.medium-centered,#buddypress div.rtmedia-activity-container .column.medium-centered,.rtmedia-container .columns.medium-centered,.rtmedia-activity-container .columns.medium-centered,#buddypress div.rtmedia-activity-container .columns.medium-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.medium-uncentered,.rtmedia-activity-container .column.medium-uncentered,#buddypress div.rtmedia-activity-container .column.medium-uncentered,.rtmedia-container .columns.medium-uncentered,.rtmedia-activity-container .columns.medium-uncentered,#buddypress div.rtmedia-activity-container .columns.medium-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.medium-uncentered.opposite,.rtmedia-activity-container .column.medium-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.medium-uncentered.opposite,.rtmedia-container .columns.medium-uncentered.opposite,.rtmedia-activity-container .columns.medium-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.medium-uncentered.opposite{float:right !important}.rtmedia-container .push-1,.rtmedia-activity-container .push-1,#buddypress div.rtmedia-activity-container .push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .pull-1,.rtmedia-activity-container .pull-1,#buddypress div.rtmedia-activity-container .pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .push-2,.rtmedia-activity-container .push-2,#buddypress div.rtmedia-activity-container .push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .pull-2,.rtmedia-activity-container .pull-2,#buddypress div.rtmedia-activity-container .pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .push-3,.rtmedia-activity-container .push-3,#buddypress div.rtmedia-activity-container .push-3{position:relative;left:25%;right:auto}.rtmedia-container .pull-3,.rtmedia-activity-container .pull-3,#buddypress div.rtmedia-activity-container .pull-3{position:relative;right:25%;left:auto}.rtmedia-container .push-4,.rtmedia-activity-container .push-4,#buddypress div.rtmedia-activity-container .push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .pull-4,.rtmedia-activity-container .pull-4,#buddypress div.rtmedia-activity-container .pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .push-5,.rtmedia-activity-container .push-5,#buddypress div.rtmedia-activity-container .push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .pull-5,.rtmedia-activity-container .pull-5,#buddypress div.rtmedia-activity-container .pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .push-6,.rtmedia-activity-container .push-6,#buddypress div.rtmedia-activity-container .push-6{position:relative;left:50%;right:auto}.rtmedia-container .pull-6,.rtmedia-activity-container .pull-6,#buddypress div.rtmedia-activity-container .pull-6{position:relative;right:50%;left:auto}.rtmedia-container .push-7,.rtmedia-activity-container .push-7,#buddypress div.rtmedia-activity-container .push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .pull-7,.rtmedia-activity-container .pull-7,#buddypress div.rtmedia-activity-container .pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .push-8,.rtmedia-activity-container .push-8,#buddypress div.rtmedia-activity-container .push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .pull-8,.rtmedia-activity-container .pull-8,#buddypress div.rtmedia-activity-container .pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .push-9,.rtmedia-activity-container .push-9,#buddypress div.rtmedia-activity-container .push-9{position:relative;left:75%;right:auto}.rtmedia-container .pull-9,.rtmedia-activity-container .pull-9,#buddypress div.rtmedia-activity-container .pull-9{position:relative;right:75%;left:auto}.rtmedia-container .push-10,.rtmedia-activity-container .push-10,#buddypress div.rtmedia-activity-container .push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .pull-10,.rtmedia-activity-container .pull-10,#buddypress div.rtmedia-activity-container .pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .push-11,.rtmedia-activity-container .push-11,#buddypress div.rtmedia-activity-container .push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .pull-11,.rtmedia-activity-container .pull-11,#buddypress div.rtmedia-activity-container .pull-11{position:relative;right:91.66667%;left:auto}}@media only screen and (min-width: 64.063em){.rtmedia-container .large-push-1,.rtmedia-activity-container .large-push-1,#buddypress div.rtmedia-activity-container .large-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .large-pull-1,.rtmedia-activity-container .large-pull-1,#buddypress div.rtmedia-activity-container .large-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .large-push-2,.rtmedia-activity-container .large-push-2,#buddypress div.rtmedia-activity-container .large-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .large-pull-2,.rtmedia-activity-container .large-pull-2,#buddypress div.rtmedia-activity-container .large-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .large-push-3,.rtmedia-activity-container .large-push-3,#buddypress div.rtmedia-activity-container .large-push-3{position:relative;left:25%;right:auto}.rtmedia-container .large-pull-3,.rtmedia-activity-container .large-pull-3,#buddypress div.rtmedia-activity-container .large-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .large-push-4,.rtmedia-activity-container .large-push-4,#buddypress div.rtmedia-activity-container .large-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .large-pull-4,.rtmedia-activity-container .large-pull-4,#buddypress div.rtmedia-activity-container .large-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .large-push-5,.rtmedia-activity-container .large-push-5,#buddypress div.rtmedia-activity-container .large-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .large-pull-5,.rtmedia-activity-container .large-pull-5,#buddypress div.rtmedia-activity-container .large-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .large-push-6,.rtmedia-activity-container .large-push-6,#buddypress div.rtmedia-activity-container .large-push-6{position:relative;left:50%;right:auto}.rtmedia-container .large-pull-6,.rtmedia-activity-container .large-pull-6,#buddypress div.rtmedia-activity-container .large-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .large-push-7,.rtmedia-activity-container .large-push-7,#buddypress div.rtmedia-activity-container .large-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .large-pull-7,.rtmedia-activity-container .large-pull-7,#buddypress div.rtmedia-activity-container .large-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .large-push-8,.rtmedia-activity-container .large-push-8,#buddypress div.rtmedia-activity-container .large-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .large-pull-8,.rtmedia-activity-container .large-pull-8,#buddypress div.rtmedia-activity-container .large-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .large-push-9,.rtmedia-activity-container .large-push-9,#buddypress div.rtmedia-activity-container .large-push-9{position:relative;left:75%;right:auto}.rtmedia-container .large-pull-9,.rtmedia-activity-container .large-pull-9,#buddypress div.rtmedia-activity-container .large-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .large-push-10,.rtmedia-activity-container .large-push-10,#buddypress div.rtmedia-activity-container .large-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .large-pull-10,.rtmedia-activity-container .large-pull-10,#buddypress div.rtmedia-activity-container .large-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .large-push-11,.rtmedia-activity-container .large-push-11,#buddypress div.rtmedia-activity-container .large-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .large-pull-11,.rtmedia-activity-container .large-pull-11,#buddypress div.rtmedia-activity-container .large-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .large-1,.rtmedia-activity-container .large-1,#buddypress div.rtmedia-activity-container .large-1{position:relative;width:8.33333%}.rtmedia-container .large-2,.rtmedia-activity-container .large-2,#buddypress div.rtmedia-activity-container .large-2{position:relative;width:16.66667%}.rtmedia-container .large-3,.rtmedia-activity-container .large-3,#buddypress div.rtmedia-activity-container .large-3{position:relative;width:25%}.rtmedia-container .large-4,.rtmedia-activity-container .large-4,#buddypress div.rtmedia-activity-container .large-4{position:relative;width:33.33333%}.rtmedia-container .large-5,.rtmedia-activity-container .large-5,#buddypress div.rtmedia-activity-container .large-5{position:relative;width:41.66667%}.rtmedia-container .large-6,.rtmedia-activity-container .large-6,#buddypress div.rtmedia-activity-container .large-6{position:relative;width:50%}.rtmedia-container .large-7,.rtmedia-activity-container .large-7,#buddypress div.rtmedia-activity-container .large-7{position:relative;width:58.33333%}.rtmedia-container .large-8,.rtmedia-activity-container .large-8,#buddypress div.rtmedia-activity-container .large-8{position:relative;width:66.66667%}.rtmedia-container .large-9,.rtmedia-activity-container .large-9,#buddypress div.rtmedia-activity-container .large-9{position:relative;width:75%}.rtmedia-container .large-10,.rtmedia-activity-container .large-10,#buddypress div.rtmedia-activity-container .large-10{position:relative;width:83.33333%}.rtmedia-container .large-11,.rtmedia-activity-container .large-11,#buddypress div.rtmedia-activity-container .large-11{position:relative;width:91.66667%}.rtmedia-container .large-12,.rtmedia-activity-container .large-12,#buddypress div.rtmedia-activity-container .large-12{position:relative;width:100%}.rtmedia-container .large-offset-0,.rtmedia-activity-container .large-offset-0,#buddypress div.rtmedia-activity-container .large-offset-0{position:relative;margin-left:0%}.rtmedia-container .large-offset-1,.rtmedia-activity-container .large-offset-1,#buddypress div.rtmedia-activity-container .large-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .large-offset-2,.rtmedia-activity-container .large-offset-2,#buddypress div.rtmedia-activity-container .large-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .large-offset-3,.rtmedia-activity-container .large-offset-3,#buddypress div.rtmedia-activity-container .large-offset-3{position:relative;margin-left:25%}.rtmedia-container .large-offset-4,.rtmedia-activity-container .large-offset-4,#buddypress div.rtmedia-activity-container .large-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .large-offset-5,.rtmedia-activity-container .large-offset-5,#buddypress div.rtmedia-activity-container .large-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .large-offset-6,.rtmedia-activity-container .large-offset-6,#buddypress div.rtmedia-activity-container .large-offset-6{position:relative;margin-left:50%}.rtmedia-container .large-offset-7,.rtmedia-activity-container .large-offset-7,#buddypress div.rtmedia-activity-container .large-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .large-offset-8,.rtmedia-activity-container .large-offset-8,#buddypress div.rtmedia-activity-container .large-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .large-offset-9,.rtmedia-activity-container .large-offset-9,#buddypress div.rtmedia-activity-container .large-offset-9{position:relative;margin-left:75%}.rtmedia-container .large-offset-10,.rtmedia-activity-container .large-offset-10,#buddypress div.rtmedia-activity-container .large-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.large-centered,.rtmedia-activity-container .column.large-centered,#buddypress div.rtmedia-activity-container .column.large-centered,.rtmedia-container .columns.large-centered,.rtmedia-activity-container .columns.large-centered,#buddypress div.rtmedia-activity-container .columns.large-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.large-uncentered,.rtmedia-activity-container .column.large-uncentered,#buddypress div.rtmedia-activity-container .column.large-uncentered,.rtmedia-container .columns.large-uncentered,.rtmedia-activity-container .columns.large-uncentered,#buddypress div.rtmedia-activity-container .columns.large-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.large-uncentered.opposite,.rtmedia-activity-container .column.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.large-uncentered.opposite,.rtmedia-container .columns.large-uncentered.opposite,.rtmedia-activity-container .columns.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.large-uncentered.opposite{float:right !important}}@media only screen and (min-width: 90.063em){.rtmedia-container .xlarge-push-1,.rtmedia-activity-container .xlarge-push-1,#buddypress div.rtmedia-activity-container .xlarge-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .xlarge-pull-1,.rtmedia-activity-container .xlarge-pull-1,#buddypress div.rtmedia-activity-container .xlarge-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .xlarge-push-2,.rtmedia-activity-container .xlarge-push-2,#buddypress div.rtmedia-activity-container .xlarge-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .xlarge-pull-2,.rtmedia-activity-container .xlarge-pull-2,#buddypress div.rtmedia-activity-container .xlarge-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .xlarge-push-3,.rtmedia-activity-container .xlarge-push-3,#buddypress div.rtmedia-activity-container .xlarge-push-3{position:relative;left:25%;right:auto}.rtmedia-container .xlarge-pull-3,.rtmedia-activity-container .xlarge-pull-3,#buddypress div.rtmedia-activity-container .xlarge-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .xlarge-push-4,.rtmedia-activity-container .xlarge-push-4,#buddypress div.rtmedia-activity-container .xlarge-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .xlarge-pull-4,.rtmedia-activity-container .xlarge-pull-4,#buddypress div.rtmedia-activity-container .xlarge-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .xlarge-push-5,.rtmedia-activity-container .xlarge-push-5,#buddypress div.rtmedia-activity-container .xlarge-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .xlarge-pull-5,.rtmedia-activity-container .xlarge-pull-5,#buddypress div.rtmedia-activity-container .xlarge-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .xlarge-push-6,.rtmedia-activity-container .xlarge-push-6,#buddypress div.rtmedia-activity-container .xlarge-push-6{position:relative;left:50%;right:auto}.rtmedia-container .xlarge-pull-6,.rtmedia-activity-container .xlarge-pull-6,#buddypress div.rtmedia-activity-container .xlarge-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .xlarge-push-7,.rtmedia-activity-container .xlarge-push-7,#buddypress div.rtmedia-activity-container .xlarge-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .xlarge-pull-7,.rtmedia-activity-container .xlarge-pull-7,#buddypress div.rtmedia-activity-container .xlarge-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .xlarge-push-8,.rtmedia-activity-container .xlarge-push-8,#buddypress div.rtmedia-activity-container .xlarge-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .xlarge-pull-8,.rtmedia-activity-container .xlarge-pull-8,#buddypress div.rtmedia-activity-container .xlarge-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .xlarge-push-9,.rtmedia-activity-container .xlarge-push-9,#buddypress div.rtmedia-activity-container .xlarge-push-9{position:relative;left:75%;right:auto}.rtmedia-container .xlarge-pull-9,.rtmedia-activity-container .xlarge-pull-9,#buddypress div.rtmedia-activity-container .xlarge-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .xlarge-push-10,.rtmedia-activity-container .xlarge-push-10,#buddypress div.rtmedia-activity-container .xlarge-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .xlarge-pull-10,.rtmedia-activity-container .xlarge-pull-10,#buddypress div.rtmedia-activity-container .xlarge-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .xlarge-push-11,.rtmedia-activity-container .xlarge-push-11,#buddypress div.rtmedia-activity-container .xlarge-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .xlarge-pull-11,.rtmedia-activity-container .xlarge-pull-11,#buddypress div.rtmedia-activity-container .xlarge-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .xlarge-1,.rtmedia-activity-container .xlarge-1,#buddypress div.rtmedia-activity-container .xlarge-1{position:relative;width:8.33333%}.rtmedia-container .xlarge-2,.rtmedia-activity-container .xlarge-2,#buddypress div.rtmedia-activity-container .xlarge-2{position:relative;width:16.66667%}.rtmedia-container .xlarge-3,.rtmedia-activity-container .xlarge-3,#buddypress div.rtmedia-activity-container .xlarge-3{position:relative;width:25%}.rtmedia-container .xlarge-4,.rtmedia-activity-container .xlarge-4,#buddypress div.rtmedia-activity-container .xlarge-4{position:relative;width:33.33333%}.rtmedia-container .xlarge-5,.rtmedia-activity-container .xlarge-5,#buddypress div.rtmedia-activity-container .xlarge-5{position:relative;width:41.66667%}.rtmedia-container .xlarge-6,.rtmedia-activity-container .xlarge-6,#buddypress div.rtmedia-activity-container .xlarge-6{position:relative;width:50%}.rtmedia-container .xlarge-7,.rtmedia-activity-container .xlarge-7,#buddypress div.rtmedia-activity-container .xlarge-7{position:relative;width:58.33333%}.rtmedia-container .xlarge-8,.rtmedia-activity-container .xlarge-8,#buddypress div.rtmedia-activity-container .xlarge-8{position:relative;width:66.66667%}.rtmedia-container .xlarge-9,.rtmedia-activity-container .xlarge-9,#buddypress div.rtmedia-activity-container .xlarge-9{position:relative;width:75%}.rtmedia-container .xlarge-10,.rtmedia-activity-container .xlarge-10,#buddypress div.rtmedia-activity-container .xlarge-10{position:relative;width:83.33333%}.rtmedia-container .xlarge-11,.rtmedia-activity-container .xlarge-11,#buddypress div.rtmedia-activity-container .xlarge-11{position:relative;width:91.66667%}.rtmedia-container .xlarge-12,.rtmedia-activity-container .xlarge-12,#buddypress div.rtmedia-activity-container .xlarge-12{position:relative;width:100%}.rtmedia-container .xlarge-offset-0,.rtmedia-activity-container .xlarge-offset-0,#buddypress div.rtmedia-activity-container .xlarge-offset-0{position:relative;margin-left:0%}.rtmedia-container .xlarge-offset-1,.rtmedia-activity-container .xlarge-offset-1,#buddypress div.rtmedia-activity-container .xlarge-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .xlarge-offset-2,.rtmedia-activity-container .xlarge-offset-2,#buddypress div.rtmedia-activity-container .xlarge-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .xlarge-offset-3,.rtmedia-activity-container .xlarge-offset-3,#buddypress div.rtmedia-activity-container .xlarge-offset-3{position:relative;margin-left:25%}.rtmedia-container .xlarge-offset-4,.rtmedia-activity-container .xlarge-offset-4,#buddypress div.rtmedia-activity-container .xlarge-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .xlarge-offset-5,.rtmedia-activity-container .xlarge-offset-5,#buddypress div.rtmedia-activity-container .xlarge-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .xlarge-offset-6,.rtmedia-activity-container .xlarge-offset-6,#buddypress div.rtmedia-activity-container .xlarge-offset-6{position:relative;margin-left:50%}.rtmedia-container .xlarge-offset-7,.rtmedia-activity-container .xlarge-offset-7,#buddypress div.rtmedia-activity-container .xlarge-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .xlarge-offset-8,.rtmedia-activity-container .xlarge-offset-8,#buddypress div.rtmedia-activity-container .xlarge-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .xlarge-offset-9,.rtmedia-activity-container .xlarge-offset-9,#buddypress div.rtmedia-activity-container .xlarge-offset-9{position:relative;margin-left:75%}.rtmedia-container .xlarge-offset-10,.rtmedia-activity-container .xlarge-offset-10,#buddypress div.rtmedia-activity-container .xlarge-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.xlarge-centered,.rtmedia-activity-container .column.xlarge-centered,#buddypress div.rtmedia-activity-container .column.xlarge-centered,.rtmedia-container .columns.xlarge-centered,.rtmedia-activity-container .columns.xlarge-centered,#buddypress div.rtmedia-activity-container .columns.xlarge-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.xlarge-uncentered,.rtmedia-activity-container .column.xlarge-uncentered,#buddypress div.rtmedia-activity-container .column.xlarge-uncentered,.rtmedia-container .columns.xlarge-uncentered,.rtmedia-activity-container .columns.xlarge-uncentered,#buddypress div.rtmedia-activity-container .columns.xlarge-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.xlarge-uncentered.opposite,.rtmedia-activity-container .column.xlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.xlarge-uncentered.opposite,.rtmedia-container .columns.xlarge-uncentered.opposite,.rtmedia-activity-container .columns.xlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.xlarge-uncentered.opposite{float:right !important}}@media only screen and (min-width: 120.063em){.rtmedia-container .xxlarge-push-1,.rtmedia-activity-container .xxlarge-push-1,#buddypress div.rtmedia-activity-container .xxlarge-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .xxlarge-pull-1,.rtmedia-activity-container .xxlarge-pull-1,#buddypress div.rtmedia-activity-container .xxlarge-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .xxlarge-push-2,.rtmedia-activity-container .xxlarge-push-2,#buddypress div.rtmedia-activity-container .xxlarge-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .xxlarge-pull-2,.rtmedia-activity-container .xxlarge-pull-2,#buddypress div.rtmedia-activity-container .xxlarge-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .xxlarge-push-3,.rtmedia-activity-container .xxlarge-push-3,#buddypress div.rtmedia-activity-container .xxlarge-push-3{position:relative;left:25%;right:auto}.rtmedia-container .xxlarge-pull-3,.rtmedia-activity-container .xxlarge-pull-3,#buddypress div.rtmedia-activity-container .xxlarge-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .xxlarge-push-4,.rtmedia-activity-container .xxlarge-push-4,#buddypress div.rtmedia-activity-container .xxlarge-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .xxlarge-pull-4,.rtmedia-activity-container .xxlarge-pull-4,#buddypress div.rtmedia-activity-container .xxlarge-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .xxlarge-push-5,.rtmedia-activity-container .xxlarge-push-5,#buddypress div.rtmedia-activity-container .xxlarge-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .xxlarge-pull-5,.rtmedia-activity-container .xxlarge-pull-5,#buddypress div.rtmedia-activity-container .xxlarge-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .xxlarge-push-6,.rtmedia-activity-container .xxlarge-push-6,#buddypress div.rtmedia-activity-container .xxlarge-push-6{position:relative;left:50%;right:auto}.rtmedia-container .xxlarge-pull-6,.rtmedia-activity-container .xxlarge-pull-6,#buddypress div.rtmedia-activity-container .xxlarge-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .xxlarge-push-7,.rtmedia-activity-container .xxlarge-push-7,#buddypress div.rtmedia-activity-container .xxlarge-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .xxlarge-pull-7,.rtmedia-activity-container .xxlarge-pull-7,#buddypress div.rtmedia-activity-container .xxlarge-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .xxlarge-push-8,.rtmedia-activity-container .xxlarge-push-8,#buddypress div.rtmedia-activity-container .xxlarge-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .xxlarge-pull-8,.rtmedia-activity-container .xxlarge-pull-8,#buddypress div.rtmedia-activity-container .xxlarge-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .xxlarge-push-9,.rtmedia-activity-container .xxlarge-push-9,#buddypress div.rtmedia-activity-container .xxlarge-push-9{position:relative;left:75%;right:auto}.rtmedia-container .xxlarge-pull-9,.rtmedia-activity-container .xxlarge-pull-9,#buddypress div.rtmedia-activity-container .xxlarge-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .xxlarge-push-10,.rtmedia-activity-container .xxlarge-push-10,#buddypress div.rtmedia-activity-container .xxlarge-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .xxlarge-pull-10,.rtmedia-activity-container .xxlarge-pull-10,#buddypress div.rtmedia-activity-container .xxlarge-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .xxlarge-push-11,.rtmedia-activity-container .xxlarge-push-11,#buddypress div.rtmedia-activity-container .xxlarge-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .xxlarge-pull-11,.rtmedia-activity-container .xxlarge-pull-11,#buddypress div.rtmedia-activity-container .xxlarge-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .xxlarge-1,.rtmedia-activity-container .xxlarge-1,#buddypress div.rtmedia-activity-container .xxlarge-1{position:relative;width:8.33333%}.rtmedia-container .xxlarge-2,.rtmedia-activity-container .xxlarge-2,#buddypress div.rtmedia-activity-container .xxlarge-2{position:relative;width:16.66667%}.rtmedia-container .xxlarge-3,.rtmedia-activity-container .xxlarge-3,#buddypress div.rtmedia-activity-container .xxlarge-3{position:relative;width:25%}.rtmedia-container .xxlarge-4,.rtmedia-activity-container .xxlarge-4,#buddypress div.rtmedia-activity-container .xxlarge-4{position:relative;width:33.33333%}.rtmedia-container .xxlarge-5,.rtmedia-activity-container .xxlarge-5,#buddypress div.rtmedia-activity-container .xxlarge-5{position:relative;width:41.66667%}.rtmedia-container .xxlarge-6,.rtmedia-activity-container .xxlarge-6,#buddypress div.rtmedia-activity-container .xxlarge-6{position:relative;width:50%}.rtmedia-container .xxlarge-7,.rtmedia-activity-container .xxlarge-7,#buddypress div.rtmedia-activity-container .xxlarge-7{position:relative;width:58.33333%}.rtmedia-container .xxlarge-8,.rtmedia-activity-container .xxlarge-8,#buddypress div.rtmedia-activity-container .xxlarge-8{position:relative;width:66.66667%}.rtmedia-container .xxlarge-9,.rtmedia-activity-container .xxlarge-9,#buddypress div.rtmedia-activity-container .xxlarge-9{position:relative;width:75%}.rtmedia-container .xxlarge-10,.rtmedia-activity-container .xxlarge-10,#buddypress div.rtmedia-activity-container .xxlarge-10{position:relative;width:83.33333%}.rtmedia-container .xxlarge-11,.rtmedia-activity-container .xxlarge-11,#buddypress div.rtmedia-activity-container .xxlarge-11{position:relative;width:91.66667%}.rtmedia-container .xxlarge-12,.rtmedia-activity-container .xxlarge-12,#buddypress div.rtmedia-activity-container .xxlarge-12{position:relative;width:100%}.rtmedia-container .xxlarge-offset-0,.rtmedia-activity-container .xxlarge-offset-0,#buddypress div.rtmedia-activity-container .xxlarge-offset-0{position:relative;margin-left:0%}.rtmedia-container .xxlarge-offset-1,.rtmedia-activity-container .xxlarge-offset-1,#buddypress div.rtmedia-activity-container .xxlarge-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .xxlarge-offset-2,.rtmedia-activity-container .xxlarge-offset-2,#buddypress div.rtmedia-activity-container .xxlarge-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .xxlarge-offset-3,.rtmedia-activity-container .xxlarge-offset-3,#buddypress div.rtmedia-activity-container .xxlarge-offset-3{position:relative;margin-left:25%}.rtmedia-container .xxlarge-offset-4,.rtmedia-activity-container .xxlarge-offset-4,#buddypress div.rtmedia-activity-container .xxlarge-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .xxlarge-offset-5,.rtmedia-activity-container .xxlarge-offset-5,#buddypress div.rtmedia-activity-container .xxlarge-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .xxlarge-offset-6,.rtmedia-activity-container .xxlarge-offset-6,#buddypress div.rtmedia-activity-container .xxlarge-offset-6{position:relative;margin-left:50%}.rtmedia-container .xxlarge-offset-7,.rtmedia-activity-container .xxlarge-offset-7,#buddypress div.rtmedia-activity-container .xxlarge-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .xxlarge-offset-8,.rtmedia-activity-container .xxlarge-offset-8,#buddypress div.rtmedia-activity-container .xxlarge-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .xxlarge-offset-9,.rtmedia-activity-container .xxlarge-offset-9,#buddypress div.rtmedia-activity-container .xxlarge-offset-9{position:relative;margin-left:75%}.rtmedia-container .xxlarge-offset-10,.rtmedia-activity-container .xxlarge-offset-10,#buddypress div.rtmedia-activity-container .xxlarge-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.xxlarge-centered,.rtmedia-activity-container .column.xxlarge-centered,#buddypress div.rtmedia-activity-container .column.xxlarge-centered,.rtmedia-container .columns.xxlarge-centered,.rtmedia-activity-container .columns.xxlarge-centered,#buddypress div.rtmedia-activity-container .columns.xxlarge-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.xxlarge-uncentered,.rtmedia-activity-container .column.xxlarge-uncentered,#buddypress div.rtmedia-activity-container .column.xxlarge-uncentered,.rtmedia-container .columns.xxlarge-uncentered,.rtmedia-activity-container .columns.xxlarge-uncentered,#buddypress div.rtmedia-activity-container .columns.xxlarge-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.xxlarge-uncentered.opposite,.rtmedia-activity-container .column.xxlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.xxlarge-uncentered.opposite,.rtmedia-container .columns.xxlarge-uncentered.opposite,.rtmedia-activity-container .columns.xxlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.xxlarge-uncentered.opposite{float:right !important}}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.show-for-small,.rtmedia-activity-container table.show-for-small,#buddypress div.rtmedia-activity-container table.show-for-small,.rtmedia-container table.show-for-small-only,.rtmedia-activity-container table.show-for-small-only,#buddypress div.rtmedia-activity-container table.show-for-small-only,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-large-down,.rtmedia-activity-container table.show-for-large-down,#buddypress div.rtmedia-activity-container table.show-for-large-down,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-up,.rtmedia-activity-container table.hide-for-medium-up,#buddypress div.rtmedia-activity-container table.hide-for-medium-up,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-large-only,.rtmedia-activity-container table.hide-for-large-only,#buddypress div.rtmedia-activity-container table.hide-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.show-for-small,.rtmedia-activity-container thead.show-for-small,#buddypress div.rtmedia-activity-container thead.show-for-small,.rtmedia-container thead.show-for-small-only,.rtmedia-activity-container thead.show-for-small-only,#buddypress div.rtmedia-activity-container thead.show-for-small-only,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-large-down,.rtmedia-activity-container thead.show-for-large-down,#buddypress div.rtmedia-activity-container thead.show-for-large-down,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-up,.rtmedia-activity-container thead.hide-for-medium-up,#buddypress div.rtmedia-activity-container thead.hide-for-medium-up,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-large-only,.rtmedia-activity-container thead.hide-for-large-only,#buddypress div.rtmedia-activity-container thead.hide-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.show-for-small,.rtmedia-activity-container tbody.show-for-small,#buddypress div.rtmedia-activity-container tbody.show-for-small,.rtmedia-container tbody.show-for-small-only,.rtmedia-activity-container tbody.show-for-small-only,#buddypress div.rtmedia-activity-container tbody.show-for-small-only,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-large-down,.rtmedia-activity-container tbody.show-for-large-down,#buddypress div.rtmedia-activity-container tbody.show-for-large-down,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-up,.rtmedia-activity-container tbody.hide-for-medium-up,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-up,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-large-only,.rtmedia-activity-container tbody.hide-for-large-only,#buddypress div.rtmedia-activity-container tbody.hide-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.show-for-small,.rtmedia-activity-container tr.show-for-small,#buddypress div.rtmedia-activity-container tr.show-for-small,.rtmedia-container tr.show-for-small-only,.rtmedia-activity-container tr.show-for-small-only,#buddypress div.rtmedia-activity-container tr.show-for-small-only,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-large-down,.rtmedia-activity-container tr.show-for-large-down,#buddypress div.rtmedia-activity-container tr.show-for-large-down,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-up,.rtmedia-activity-container tr.hide-for-medium-up,#buddypress div.rtmedia-activity-container tr.hide-for-medium-up,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-large-only,.rtmedia-activity-container tr.hide-for-large-only,#buddypress div.rtmedia-activity-container tr.hide-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.show-for-small,.rtmedia-activity-container td.show-for-small,#buddypress div.rtmedia-activity-container td.show-for-small,.rtmedia-container td.show-for-small-only,.rtmedia-activity-container td.show-for-small-only,#buddypress div.rtmedia-activity-container td.show-for-small-only,.rtmedia-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-container td.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-activity-container td.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-up,.rtmedia-activity-container td.hide-for-medium-up,#buddypress div.rtmedia-activity-container td.hide-for-medium-up,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-container td.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-activity-container td.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container th.show-for-small,.rtmedia-activity-container th.show-for-small,#buddypress div.rtmedia-activity-container th.show-for-small,.rtmedia-container th.show-for-small-only,.rtmedia-activity-container th.show-for-small-only,#buddypress div.rtmedia-activity-container th.show-for-small-only,.rtmedia-container th.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-container td.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-container th.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-container th.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-container th.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-activity-container th.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-up,.rtmedia-activity-container th.hide-for-medium-up,#buddypress div.rtmedia-activity-container th.hide-for-medium-up,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-container th.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-activity-container th.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container td.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-container th.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-container td.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-container td.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-container td.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-activity-container td.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container td.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-container td.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-activity-container td.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-container th.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-activity-container th.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-container th.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-activity-container th.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up{display:table-cell !important}@media only screen and (min-width: 40.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.show-for-medium,.rtmedia-activity-container table.show-for-medium,#buddypress div.rtmedia-activity-container table.show-for-medium,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-medium-only,.rtmedia-activity-container table.show-for-medium-only,#buddypress div.rtmedia-activity-container table.show-for-medium-only,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-large-only,.rtmedia-activity-container table.hide-for-large-only,#buddypress div.rtmedia-activity-container table.hide-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.show-for-medium,.rtmedia-activity-container thead.show-for-medium,#buddypress div.rtmedia-activity-container thead.show-for-medium,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-medium-only,.rtmedia-activity-container thead.show-for-medium-only,#buddypress div.rtmedia-activity-container thead.show-for-medium-only,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-large-only,.rtmedia-activity-container thead.hide-for-large-only,#buddypress div.rtmedia-activity-container thead.hide-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.show-for-medium,.rtmedia-activity-container tbody.show-for-medium,#buddypress div.rtmedia-activity-container tbody.show-for-medium,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-medium-only,.rtmedia-activity-container tbody.show-for-medium-only,#buddypress div.rtmedia-activity-container tbody.show-for-medium-only,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-large-only,.rtmedia-activity-container tbody.hide-for-large-only,#buddypress div.rtmedia-activity-container tbody.hide-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.show-for-medium,.rtmedia-activity-container tr.show-for-medium,#buddypress div.rtmedia-activity-container tr.show-for-medium,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-medium-only,.rtmedia-activity-container tr.show-for-medium-only,#buddypress div.rtmedia-activity-container tr.show-for-medium-only,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-large-only,.rtmedia-activity-container tr.hide-for-large-only,#buddypress div.rtmedia-activity-container tr.hide-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.show-for-medium,.rtmedia-activity-container td.show-for-medium,#buddypress div.rtmedia-activity-container td.show-for-medium,.rtmedia-container td.show-for-medium-down,.rtmedia-activity-container td.show-for-medium-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-medium-only,.rtmedia-activity-container td.show-for-medium-only,#buddypress div.rtmedia-activity-container td.show-for-medium-only,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-large-only,.rtmedia-activity-container td.hide-for-large-only,#buddypress div.rtmedia-activity-container td.hide-for-large-only,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge-only,.rtmedia-activity-container td.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.show-for-medium,.rtmedia-activity-container th.show-for-medium,#buddypress div.rtmedia-activity-container th.show-for-medium,.rtmedia-container th.show-for-medium-down,.rtmedia-activity-container th.show-for-medium-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-medium-only,.rtmedia-activity-container th.show-for-medium-only,#buddypress div.rtmedia-activity-container th.show-for-medium-only,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-large-only,.rtmedia-activity-container th.hide-for-large-only,#buddypress div.rtmedia-activity-container th.hide-for-large-only,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge,.rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge-only,.rtmedia-activity-container th.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 64.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large,.rtmedia-activity-container table.show-for-large,#buddypress div.rtmedia-activity-container table.show-for-large,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-large-only,.rtmedia-activity-container table.show-for-large-only,#buddypress div.rtmedia-activity-container table.show-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large,.rtmedia-activity-container thead.show-for-large,#buddypress div.rtmedia-activity-container thead.show-for-large,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-large-only,.rtmedia-activity-container thead.show-for-large-only,#buddypress div.rtmedia-activity-container thead.show-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large,.rtmedia-activity-container tbody.show-for-large,#buddypress div.rtmedia-activity-container tbody.show-for-large,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-large-only,.rtmedia-activity-container tbody.show-for-large-only,#buddypress div.rtmedia-activity-container tbody.show-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large,.rtmedia-activity-container tr.show-for-large,#buddypress div.rtmedia-activity-container tr.show-for-large,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-large-only,.rtmedia-activity-container tr.show-for-large-only,#buddypress div.rtmedia-activity-container tr.show-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large,.rtmedia-activity-container td.show-for-large,#buddypress div.rtmedia-activity-container td.show-for-large,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-large-only,.rtmedia-activity-container td.show-for-large-only,#buddypress div.rtmedia-activity-container td.show-for-large-only,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge-only,.rtmedia-activity-container td.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large,.rtmedia-activity-container th.show-for-large,#buddypress div.rtmedia-activity-container th.show-for-large,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-large-only,.rtmedia-activity-container th.show-for-large-only,#buddypress div.rtmedia-activity-container th.show-for-large-only,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge,.rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge-only,.rtmedia-activity-container th.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 90.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-xlarge,.rtmedia-activity-container table.show-for-xlarge,#buddypress div.rtmedia-activity-container table.show-for-xlarge,.rtmedia-container table.show-for-xlarge-up,.rtmedia-activity-container table.show-for-xlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xlarge-up,.rtmedia-container table.show-for-xlarge-only,.rtmedia-activity-container table.show-for-xlarge-only,#buddypress div.rtmedia-activity-container table.show-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-xlarge,.rtmedia-activity-container thead.show-for-xlarge,#buddypress div.rtmedia-activity-container thead.show-for-xlarge,.rtmedia-container thead.show-for-xlarge-up,.rtmedia-activity-container thead.show-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-up,.rtmedia-container thead.show-for-xlarge-only,.rtmedia-activity-container thead.show-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-xlarge,.rtmedia-activity-container tbody.show-for-xlarge,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge,.rtmedia-container tbody.show-for-xlarge-up,.rtmedia-activity-container tbody.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-up,.rtmedia-container tbody.show-for-xlarge-only,.rtmedia-activity-container tbody.show-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-xlarge,.rtmedia-activity-container tr.show-for-xlarge,#buddypress div.rtmedia-activity-container tr.show-for-xlarge,.rtmedia-container tr.show-for-xlarge-up,.rtmedia-activity-container tr.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-up,.rtmedia-container tr.show-for-xlarge-only,.rtmedia-activity-container tr.show-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-xlarge,.rtmedia-activity-container td.show-for-xlarge,#buddypress div.rtmedia-activity-container td.show-for-xlarge,.rtmedia-container td.show-for-xlarge-up,.rtmedia-activity-container td.show-for-xlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xlarge-up,.rtmedia-container td.show-for-xlarge-only,.rtmedia-activity-container td.show-for-xlarge-only,#buddypress div.rtmedia-activity-container td.show-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-xlarge,.rtmedia-activity-container th.show-for-xlarge,#buddypress div.rtmedia-activity-container th.show-for-xlarge,.rtmedia-container th.show-for-xlarge-up,.rtmedia-activity-container th.show-for-xlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xlarge-up,.rtmedia-container th.show-for-xlarge-only,.rtmedia-activity-container th.show-for-xlarge-only,#buddypress div.rtmedia-activity-container th.show-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 120.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-xlarge-up,.rtmedia-activity-container table.show-for-xlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xlarge-up,.rtmedia-container table.show-for-xxlarge-up,.rtmedia-activity-container table.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xxlarge-up,.rtmedia-container table.show-for-xxlarge-only,.rtmedia-activity-container table.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.show-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-xlarge-up,.rtmedia-activity-container thead.show-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-up,.rtmedia-container thead.show-for-xxlarge-up,.rtmedia-activity-container thead.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xxlarge-up,.rtmedia-container thead.show-for-xxlarge-only,.rtmedia-activity-container thead.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.show-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-xlarge-up,.rtmedia-activity-container tbody.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-up,.rtmedia-container tbody.show-for-xxlarge-up,.rtmedia-activity-container tbody.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xxlarge-up,.rtmedia-container tbody.show-for-xxlarge-only,.rtmedia-activity-container tbody.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.show-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-xlarge-up,.rtmedia-activity-container tr.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-up,.rtmedia-container tr.show-for-xxlarge-up,.rtmedia-activity-container tr.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xxlarge-up,.rtmedia-container tr.show-for-xxlarge-only,.rtmedia-activity-container tr.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.show-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-xlarge-up,.rtmedia-activity-container td.show-for-xlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xlarge-up,.rtmedia-container td.show-for-xxlarge-up,.rtmedia-activity-container td.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xxlarge-up,.rtmedia-container td.show-for-xxlarge-only,.rtmedia-activity-container td.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.show-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-xlarge-up,.rtmedia-activity-container th.show-for-xlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xlarge-up,.rtmedia-container th.show-for-xxlarge-up,.rtmedia-activity-container th.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xxlarge-up,.rtmedia-container th.show-for-xxlarge-only,.rtmedia-activity-container th.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.show-for-xxlarge-only{display:table-cell !important}}.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape,.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait{display:table}.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape,.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait{display:table-header-group !important}.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape,.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait{display:table-row-group !important}.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape,.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait{display:table-row !important}.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.show-for-landscape,.rtmedia-activity-container table.show-for-landscape,#buddypress div.rtmedia-activity-container table.show-for-landscape,.rtmedia-container table.hide-for-portrait,.rtmedia-activity-container table.hide-for-portrait,#buddypress div.rtmedia-activity-container table.hide-for-portrait{display:table}.rtmedia-container thead.show-for-landscape,.rtmedia-activity-container thead.show-for-landscape,#buddypress div.rtmedia-activity-container thead.show-for-landscape,.rtmedia-container thead.hide-for-portrait,.rtmedia-activity-container thead.hide-for-portrait,#buddypress div.rtmedia-activity-container thead.hide-for-portrait{display:table-header-group !important}.rtmedia-container tbody.show-for-landscape,.rtmedia-activity-container tbody.show-for-landscape,#buddypress div.rtmedia-activity-container tbody.show-for-landscape,.rtmedia-container tbody.hide-for-portrait,.rtmedia-activity-container tbody.hide-for-portrait,#buddypress div.rtmedia-activity-container tbody.hide-for-portrait{display:table-row-group !important}.rtmedia-container tr.show-for-landscape,.rtmedia-activity-container tr.show-for-landscape,#buddypress div.rtmedia-activity-container tr.show-for-landscape,.rtmedia-container tr.hide-for-portrait,.rtmedia-activity-container tr.hide-for-portrait,#buddypress div.rtmedia-activity-container tr.hide-for-portrait{display:table-row !important}.rtmedia-container td.show-for-landscape,.rtmedia-activity-container td.show-for-landscape,#buddypress div.rtmedia-activity-container td.show-for-landscape,.rtmedia-container td.hide-for-portrait,.rtmedia-activity-container td.hide-for-portrait,#buddypress div.rtmedia-activity-container td.hide-for-portrait,.rtmedia-container th.show-for-landscape,.rtmedia-activity-container th.show-for-landscape,#buddypress div.rtmedia-activity-container th.show-for-landscape,.rtmedia-container th.hide-for-portrait,.rtmedia-activity-container th.hide-for-portrait,#buddypress div.rtmedia-activity-container th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait,.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape{display:inherit !important}.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait,.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape{display:none !important}.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait,.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape{display:table}.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait,.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape{display:table-header-group !important}.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait,.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape{display:table-row-group !important}.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait,.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape{display:table-row !important}.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape{display:table-cell !important}}.rtmedia-container .show-for-touch,.rtmedia-activity-container .show-for-touch,#buddypress div.rtmedia-activity-container .show-for-touch{display:none !important}.rtmedia-container .hide-for-touch,.rtmedia-activity-container .hide-for-touch,#buddypress div.rtmedia-activity-container .hide-for-touch{display:inherit !important}.rtmedia-container .touch .show-for-touch,.rtmedia-activity-container .touch .show-for-touch,#buddypress div.rtmedia-activity-container .touch .show-for-touch{display:inherit !important}.rtmedia-container .touch .hide-for-touch,.rtmedia-activity-container .touch .hide-for-touch,#buddypress div.rtmedia-activity-container .touch .hide-for-touch{display:none !important}.rtmedia-container table.hide-for-touch,.rtmedia-activity-container table.hide-for-touch,#buddypress div.rtmedia-activity-container table.hide-for-touch{display:table}.rtmedia-container .touch table.show-for-touch,.rtmedia-activity-container .touch table.show-for-touch,#buddypress div.rtmedia-activity-container .touch table.show-for-touch{display:table}.rtmedia-container thead.hide-for-touch,.rtmedia-activity-container thead.hide-for-touch,#buddypress div.rtmedia-activity-container thead.hide-for-touch{display:table-header-group !important}.rtmedia-container .touch thead.show-for-touch,.rtmedia-activity-container .touch thead.show-for-touch,#buddypress div.rtmedia-activity-container .touch thead.show-for-touch{display:table-header-group !important}.rtmedia-container tbody.hide-for-touch,.rtmedia-activity-container tbody.hide-for-touch,#buddypress div.rtmedia-activity-container tbody.hide-for-touch{display:table-row-group !important}.rtmedia-container .touch tbody.show-for-touch,.rtmedia-activity-container .touch tbody.show-for-touch,#buddypress div.rtmedia-activity-container .touch tbody.show-for-touch{display:table-row-group !important}.rtmedia-container tr.hide-for-touch,.rtmedia-activity-container tr.hide-for-touch,#buddypress div.rtmedia-activity-container tr.hide-for-touch{display:table-row !important}.rtmedia-container .touch tr.show-for-touch,.rtmedia-activity-container .touch tr.show-for-touch,#buddypress div.rtmedia-activity-container .touch tr.show-for-touch{display:table-row !important}.rtmedia-container td.hide-for-touch,.rtmedia-activity-container td.hide-for-touch,#buddypress div.rtmedia-activity-container td.hide-for-touch{display:table-cell !important}.rtmedia-container .touch td.show-for-touch,.rtmedia-activity-container .touch td.show-for-touch,#buddypress div.rtmedia-activity-container .touch td.show-for-touch{display:table-cell !important}.rtmedia-container th.hide-for-touch,.rtmedia-activity-container th.hide-for-touch,#buddypress div.rtmedia-activity-container th.hide-for-touch{display:table-cell !important}.rtmedia-container .touch th.show-for-touch,.rtmedia-activity-container .touch th.show-for-touch,#buddypress div.rtmedia-activity-container .touch th.show-for-touch{display:table-cell !important}.rtmedia-container .flex-video,.rtmedia-activity-container .flex-video,#buddypress div.rtmedia-activity-container .flex-video{position:relative;padding-top:1.5625rem;padding-bottom:67.5%;height:0;margin-bottom:1rem;overflow:hidden}.rtmedia-container .flex-video.widescreen,.rtmedia-activity-container .flex-video.widescreen,#buddypress div.rtmedia-activity-container .flex-video.widescreen{padding-bottom:57.25%}.rtmedia-container .flex-video.vimeo,.rtmedia-activity-container .flex-video.vimeo,#buddypress div.rtmedia-activity-container .flex-video.vimeo{padding-top:0}.rtmedia-container .flex-video iframe,.rtmedia-activity-container .flex-video iframe,#buddypress div.rtmedia-activity-container .flex-video iframe,.rtmedia-container .flex-video object,.rtmedia-activity-container .flex-video object,#buddypress div.rtmedia-activity-container .flex-video object,.rtmedia-container .flex-video embed,.rtmedia-activity-container .flex-video embed,#buddypress div.rtmedia-activity-container .flex-video embed,.rtmedia-container .flex-video video,.rtmedia-activity-container .flex-video video,#buddypress div.rtmedia-activity-container .flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.rtmedia-container .tabs,.rtmedia-activity-container .tabs,#buddypress div.rtmedia-activity-container .tabs{*zoom:1;margin-bottom:0 !important}.rtmedia-container .tabs:before,.rtmedia-activity-container .tabs:before,#buddypress div.rtmedia-activity-container .tabs:before,.rtmedia-container .tabs:after,.rtmedia-activity-container .tabs:after,#buddypress div.rtmedia-activity-container .tabs:after{content:" ";display:table}.rtmedia-container .tabs:after,.rtmedia-activity-container .tabs:after,#buddypress div.rtmedia-activity-container .tabs:after{clear:both}.rtmedia-container .tabs dd,.rtmedia-activity-container .tabs dd,#buddypress div.rtmedia-activity-container .tabs dd{position:relative;margin-bottom:0 !important;top:1px;float:left}.rtmedia-container .tabs dd>a,.rtmedia-activity-container .tabs dd>a,#buddypress div.rtmedia-activity-container .tabs dd>a{display:block;background:#efefef;color:#222;padding-top:1rem;padding-right:2rem;padding-bottom:1.0625rem;padding-left:2rem;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-size:1rem}.rtmedia-container .tabs dd>a:hover,.rtmedia-activity-container .tabs dd>a:hover,#buddypress div.rtmedia-activity-container .tabs dd>a:hover{background:#e2e2e2}.rtmedia-container .tabs dd.active a,.rtmedia-activity-container .tabs dd.active a,#buddypress div.rtmedia-activity-container .tabs dd.active a{background:#fff}.rtmedia-container .tabs.radius dd:first-child a,.rtmedia-activity-container .tabs.radius dd:first-child a,#buddypress div.rtmedia-activity-container .tabs.radius dd:first-child a{-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.rtmedia-container .tabs.radius dd:last-child a,.rtmedia-activity-container .tabs.radius dd:last-child a,#buddypress div.rtmedia-activity-container .tabs.radius dd:last-child a{-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.rtmedia-container .tabs.vertical dd,.rtmedia-activity-container .tabs.vertical dd,#buddypress div.rtmedia-activity-container .tabs.vertical dd{position:inherit;float:none;display:block;top:auto}.rtmedia-container .tabs-content,.rtmedia-activity-container .tabs-content,#buddypress div.rtmedia-activity-container .tabs-content{*zoom:1;margin-bottom:1.5rem}.rtmedia-container .tabs-content:before,.rtmedia-activity-container .tabs-content:before,#buddypress div.rtmedia-activity-container .tabs-content:before,.rtmedia-container .tabs-content:after,.rtmedia-activity-container .tabs-content:after,#buddypress div.rtmedia-activity-container .tabs-content:after{content:" ";display:table}.rtmedia-container .tabs-content:after,.rtmedia-activity-container .tabs-content:after,#buddypress div.rtmedia-activity-container .tabs-content:after{clear:both}.rtmedia-container .tabs-content>.content,.rtmedia-activity-container .tabs-content>.content,#buddypress div.rtmedia-activity-container .tabs-content>.content{display:none;float:left;padding:0.9375rem 0}.rtmedia-container .tabs-content>.content.active,.rtmedia-activity-container .tabs-content>.content.active,#buddypress div.rtmedia-activity-container .tabs-content>.content.active{display:block}.rtmedia-container .tabs-content>.content.contained,.rtmedia-activity-container .tabs-content>.content.contained,#buddypress div.rtmedia-activity-container .tabs-content>.content.contained{padding:0.9375rem}.rtmedia-container .tabs-content.vertical,.rtmedia-activity-container .tabs-content.vertical,#buddypress div.rtmedia-activity-container .tabs-content.vertical{display:block}.rtmedia-container .tabs-content.vertical>.content,.rtmedia-activity-container .tabs-content.vertical>.content,#buddypress div.rtmedia-activity-container .tabs-content.vertical>.content{padding:0 0.9375rem}@media only screen and (min-width: 40.063em){.rtmedia-container .tabs.vertical,.rtmedia-activity-container .tabs.vertical,#buddypress div.rtmedia-activity-container .tabs.vertical{width:20%;float:left;margin-bottom:1.25rem}.rtmedia-container .tabs-content.vertical,.rtmedia-activity-container .tabs-content.vertical,#buddypress div.rtmedia-activity-container .tabs-content.vertical{width:80%;float:left;margin-left:-1px}}.rtmedia-container .rtmedia-editor-main dl.tabs dd>a,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a{font-size:14px;text-decoration:none;padding:5px 15px;background:#f1f1f1}.rtmedia-container .rtmedia-editor-main dl.tabs dd>a:hover,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a:hover,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a:hover{background:#dcdcdc}.rtmedia-container .rtmedia-editor-main dl.tabs dd.active>a,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd.active>a,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd.active>a{background:#50A1D7;color:#fff}.rtmedia-container .rtmedia-editor-main .tabs-content,.rtmedia-activity-container .rtmedia-editor-main .tabs-content,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .tabs-content{margin-bottom:5px}.rtmedia-container .rtmedia-editor-main .tabs-content .content,.rtmedia-activity-container .rtmedia-editor-main .tabs-content .content,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .tabs-content .content{float:none;padding:10px}.rtmedia-container .rtmedia-editor-main .rtmedia-title-editor,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-title-editor,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-title-editor{display:block;width:100%}.rtmedia-container .rtmedia-editor-main .rtmedia-edit-change-album,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-change-album,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-change-album{margin-top:15px}.rtmedia-container .rtmedia-editor-main .rtmedia-edit-title label,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-title label,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-title label{display:block}.rtmedia-container .primary,.rtmedia-activity-container .primary,#buddypress div.rtmedia-activity-container .primary{color:#3475BA}.rtmedia-container .secondary,.rtmedia-activity-container .secondary,#buddypress div.rtmedia-activity-container .secondary{color:#82909D}.rtmedia-container #buddypress li,.rtmedia-activity-container #buddypress li{list-style:none}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{max-width:95%}.rtmedia-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title,#buddypress div.rtmedia-activity-container .rtmedia-item-title{text-align:center}.rtmedia-container .rtmedia-item-title h4,.rtmedia-activity-container .rtmedia-item-title h4,#buddypress div.rtmedia-activity-container .rtmedia-item-title h4{text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden;font-size:1.1em;text-align:center}.rtmedia-container .rtmedia-success,.rtmedia-activity-container .rtmedia-success,#buddypress div.rtmedia-activity-container .rtmedia-success{display:block;padding:5px;margin-top:15px;border:1px solid #457A1A;background-color:#5DA423;font-weight:bold}.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2{font-size:1.4em;font-weight:bold;line-height:2.4em}.rtmedia-container .drag-drop,.rtmedia-activity-container .drag-drop,#buddypress div.rtmedia-activity-container .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;color:#AAAAAA;padding:25px 0}.rtmedia-container .drag-drop.dragover,.rtmedia-activity-container .drag-drop.dragover,#buddypress div.rtmedia-activity-container .drag-drop.dragover{border-color:#83b4d8}.rtmedia-container .drag-drop .drag-drop-info,.rtmedia-activity-container .drag-drop .drag-drop-info,#buddypress div.rtmedia-activity-container .drag-drop .drag-drop-info{font-size:20px;line-height:24px}.rtmedia-container .drag-drop .rtm-album-privacy span,.rtmedia-activity-container .drag-drop .rtm-album-privacy span,#buddypress div.rtmedia-activity-container .drag-drop .rtm-album-privacy span{margin:0 30px 20px 30px;display:inline-block}.rtmedia-container .drag-drop .rtm-select-files span,.rtmedia-activity-container .drag-drop .rtm-select-files span,#buddypress div.rtmedia-activity-container .drag-drop .rtm-select-files span{vertical-align:middle}.rtmedia-container .drag-drop .rtm-seperator,.rtmedia-activity-container .drag-drop .rtm-seperator,#buddypress div.rtmedia-activity-container .drag-drop .rtm-seperator{margin:0px 20px}.rtmedia-container .drag-drop .start-media-upload,.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload{display:none;margin-top:20px}.rtmedia-container .drag-drop .rtm-file-size-limit,.rtmedia-activity-container .drag-drop .rtm-file-size-limit,#buddypress div.rtmedia-activity-container .drag-drop .rtm-file-size-limit{vertical-align:middle;font-size:16px;line-height:24px}.rtmedia-container .rtmedia-action-update,.rtmedia-activity-container .rtmedia-action-update,#buddypress div.rtmedia-activity-container .rtmedia-action-update{float:left;margin-top:12px;margin-right:10px}.rtmedia-container .rtmedia-list,.rtmedia-activity-container .rtmedia-list,#buddypress div.rtmedia-activity-container .rtmedia-list{list-style:none}.rtmedia-container .rtmedia-list .rtmedia-list-item,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item{word-wrap:break-word;margin:10px;float:left;list-style:none;position:relative}.rtmedia-container .rtmedia-list .rtmedia-list-item a,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a{text-decoration:none}.rtmedia-container .rtmedia-list .rtmedia-list-item a h4,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4{line-height:1.4em;font-size:1.2em;padding-top:10px}.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector{position:absolute}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video{width:100%}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail{margin:8px 4px 0px 4px;height:0px}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time{height:24px}.rtmedia-container .rtmedia-media img,.rtmedia-activity-container .rtmedia-media img,#buddypress div.rtmedia-activity-container .rtmedia-media img{max-width:100%}.rtmedia-container .rtmedia-item-thumbnail,.rtmedia-activity-container .rtmedia-item-thumbnail,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail{text-align:center}.rtmedia-container .rtmedia-item-thumbnail img,.rtmedia-activity-container .rtmedia-item-thumbnail img,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail img{vertical-align:middle}.rtmedia-container .rtmedia_next_prev,.rtmedia-activity-container .rtmedia_next_prev,#buddypress div.rtmedia-activity-container .rtmedia_next_prev{clear:both}.rtmedia-container .rtmedia_next_prev a,.rtmedia-activity-container .rtmedia_next_prev a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev a{display:block;clear:both;background-color:#E9E9E9;padding:10px;text-align:center;text-decoration:none;color:#000;margin:15px}.rtmedia-container .rtmedia_next_prev .pagination,.rtmedia-activity-container .rtmedia_next_prev .pagination,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination{clear:both;padding:0;position:relative;font-size:11px;line-height:13px}.rtmedia-container .rtmedia_next_prev .pagination span,.rtmedia-activity-container .rtmedia_next_prev .pagination span,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination span,.rtmedia-container .rtmedia_next_prev .pagination a,.rtmedia-activity-container .rtmedia_next_prev .pagination a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination a{display:inline;float:left;margin:2px 2px 2px 0;padding:6px 9px 5px 9px;text-decoration:none;width:auto;color:#fff;background:#555;float:none;font-size:13px;line-height:30px}.rtmedia-container .rtmedia_next_prev .pagination span:hover,.rtmedia-activity-container .rtmedia_next_prev .pagination span:hover,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination span:hover,.rtmedia-container .rtmedia_next_prev .pagination a:hover,.rtmedia-activity-container .rtmedia_next_prev .pagination a:hover,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination a:hover{color:#fff;background:#bc360a}.rtmedia-container .rtmedia_next_prev .pagination .current,.rtmedia-activity-container .rtmedia_next_prev .pagination .current,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .current{padding:6px 9px 5px 9px;background:#bc360a;color:#fff}.rtmedia-container .rtmedia_next_prev .pagination .rtmedia-page-no,.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no{display:inline;float:left;font-size:13px;color:#888}.rtmedia-container .rtmedia_next_prev .pagination .rtmedia-page-no input,.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no input,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no input{padding:3px;max-width:50px}.rtmedia-container .rtmedia-item-comments-container,.rtmedia-activity-container .rtmedia-item-comments-container,#buddypress div.rtmedia-activity-container .rtmedia-item-comments-container{margin:3% 3%}.rtmedia-container #rtmedia_comment_ul,.rtmedia-activity-container #rtmedia_comment_ul,#buddypress div.rtmedia-activity-container #rtmedia_comment_ul{margin-left:0;margin-bottom:10px}.rtmedia-container .rtmedia-bp-header,.rtmedia-activity-container .rtmedia-bp-header,#buddypress div.rtmedia-activity-container .rtmedia-bp-header{width:460px;margin:auto}.rtmedia-container #div-attache-rtmedia,.rtmedia-activity-container #div-attache-rtmedia,#buddypress div.rtmedia-activity-container #div-attache-rtmedia{display:none}.rtmedia-container #rtMedia-update-queue-list p span,.rtmedia-activity-container #rtMedia-update-queue-list p span{margin-right:20px}.rtmedia-container .rtmedia-move-container,.rtmedia-activity-container .rtmedia-move-container,#buddypress div.rtmedia-activity-container .rtmedia-move-container{display:none;padding:10px;border:1px dashed #999}.rtmedia-container #rtmedia-add-media-button-post-update,.rtmedia-activity-container #rtmedia-add-media-button-post-update,#buddypress div.rtmedia-activity-container #rtmedia-add-media-button-post-update{float:left;margin-top:10px;margin-right:20px}.rtmedia-container #whats-new-post-in-box,.rtmedia-activity-container #whats-new-post-in-box,#buddypress div.rtmedia-activity-container #whats-new-post-in-box{float:left}.rtmedia-container .rtmedia-activity-text,.rtmedia-activity-container .rtmedia-activity-text,#buddypress div.rtmedia-activity-container .rtmedia-activity-text{display:block;padding-bottom:10px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:auto}.rtmedia-container.rtmedia-single-container .row,.rtmedia-single-container.rtmedia-activity-container .row,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row{background-color:#FFF}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container{padding-top:10px;padding-bottom:10px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button{margin:-50px 0 0 -50px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media-title,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media-title{margin:0 0 5px 0;display:block;font-weight:bold;letter-spacing:1px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta{padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.userprofile,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile{float:left;padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username{padding:0 10px;line-height:16px;font-weight:bold}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a{text-decoration:none}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username a:hover,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a:hover,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a:hover{text-decoration:underline}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtm-time-privacy,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy{font-size:12px;line-height:24px;margin-bottom:7px;color:#808080}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtm-time-privacy i,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy i,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy i{margin-left:4px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtmedia-actions-before-description,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description{margin-top:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div{float:left;line-height:20px;display:inline-block}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta button,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button{color:#5E5E5E;background-color:#EBEBEB;background-repeat:repeat-x;background-image:-moz-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-ms-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-webkit-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-o-linear-gradient(top, #f9f9f9, #ebebeb);background-image:linear-gradient(to bottom, #f9f9f9,#ebebeb)}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a{float:left;margin:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li{display:inline-block;float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like{display:none}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a{display:inline-block;float:left}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>form,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form{float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count{background:#EEE;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;border:1px solid #CCC;color:#999;display:inline;font-size:70%;margin-left:2px;margin-right:2px;padding:3px 6px;text-align:center;vertical-align:middle}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-media-description,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-media-description,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-media-description{line-height:22px;margin:10px 0}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info{width:100%}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info:before,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before{top:13px;left:20px}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtmedia-like-info,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info{background-color:#EDEFF4;font-size:12px;line-height:16px;padding:3px 5px;position:relative;margin-bottom:2px}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtmedia-like-info i,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info i,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info i{margin-right:4px}.rtmedia-container #wp-description-editor-tools a.wp-switch-editor,.rtmedia-activity-container #wp-description-editor-tools a.wp-switch-editor{margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border:1px solid;border-color:#DFDFDF #DFDFDF #CCC;font:13px/18px Arial,Helvetica,sans-serif normal;height:auto}.rtmedia-container #description_toolbargroup .mceToolbar td,.rtmedia-activity-container #description_toolbargroup .mceToolbar td{padding:0px}.rtmedia-container #wp-description-editor-container,.rtmedia-activity-container #wp-description-editor-container,#buddypress div.rtmedia-activity-container #wp-description-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#CCC #CCC #DFDFDF}.rtmedia-container .rtmedia-change-cover-arts p,.rtmedia-activity-container .rtmedia-change-cover-arts p,#buddypress div.rtmedia-activity-container .rtmedia-change-cover-arts p{padding:5px 0}.rtmedia-container .rtm-media-loading,.rtmedia-activity-container .rtm-media-loading,#buddypress div.rtmedia-activity-container .rtm-media-loading{text-align:center;padding:20px 0}.rt-clear:after{display:block;height:0;line-height:0;clear:both;content:'.';visibility:hidden}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments{color:#6D84B4;line-height:18px;margin-bottom:5px}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span{display:inline-block;margin-right:5px}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons{padding:0;color:#21759B;font-size:12px;line-height:14px;text-decoration:none}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a:hover,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button:hover,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons:hover{text-decoration:underline}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a.rtmedia-like i,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-like i,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons.rtmedia-like i{display:none}#buddypress button.rtm-alert-btn{background-color:#f04124;border-color:#cf280e;color:white}#buddypress div.rtmedia-activity-container ul.rtmedia-list li{float:left;padding:10px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li .rtmedia-item-thumbnail{overflow:hidden}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video{float:none}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail{margin:0 auto;overflow:hidden}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-overlay-button{margin:-50px 0 0 -50px}#buddypress .mejs-controls button,.rtmedia-container .mejs-controls button,.rtmedia-activity-container .mejs-controls button,#buddypress div.rtmedia-activity-container .mejs-controls button{padding:4px 8px;border:none;background:transparent url("../../../lib/media-element/controls.png") no-repeat}#buddypress .mejs-controls .mejs-play button,.rtmedia-container .mejs-controls .mejs-play button,.rtmedia-activity-container .mejs-controls .mejs-play button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-play button{background-position:0 0}#buddypress .mejs-controls .mejs-pause button,.rtmedia-container .mejs-controls .mejs-pause button,.rtmedia-activity-container .mejs-controls .mejs-pause button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-pause button{background-position:0 -16px}#buddypress .mejs-controls .mejs-unmute button,.rtmedia-container .mejs-controls .mejs-unmute button,.rtmedia-activity-container .mejs-controls .mejs-unmute button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-unmute button{background-position:-16px 0}#buddypress .mejs-controls .mejs-mute button,.rtmedia-container .mejs-controls .mejs-mute button,.rtmedia-activity-container .mejs-controls .mejs-mute button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress .mejs-controls .mejs-fullscreen-button button,.rtmedia-container .mejs-controls .mejs-fullscreen-button button,.rtmedia-activity-container .mejs-controls .mejs-fullscreen-button button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#buddypress .mejs-controls .mejs-unfullscreen button,.rtmedia-container .mejs-controls .mejs-unfullscreen button,.rtmedia-activity-container .mejs-controls .mejs-unfullscreen button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mfp-content #rtmedia-single-media-container .rtmedia-media{text-align:center;background-color:#333;overflow:hidden}.mfp-content #rtmedia-single-media-container .rtmedia-media img{max-height:95%}#rtmedia-action-update{float:left;padding-right:10px}.mfp-ready,.mfp-bg{z-index:9999}div.mfp-bg{background-color:#222222;opacity:0.7}.bp_media_content video{background-color:black}.rtmedia-success{display:block;padding:5px 10px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#2ECC71;color:white}.rtmedia-error{color:white;display:block;padding:10px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#E74C3C}.rtmp-uploaded-file{width:100%}.close{cursor:pointer;color:red}button.mfp-arrow,button.mfp-arrow:active{margin-top:-30px}button.rtp-lb-close{top:0;right:0}#object-nav li,#group-admins li,.item-list-tabs li{list-style:none}.mejs-video .mejs-controls{position:absolute}.mfp-content #rtmedia-single-media-container .wp-audio-shortcode{height:0px !important}.rtmedia-media-edit .rtmedia-single-edit-title-container,#buddypress .rtmedia-media-edit .rtmedia-single-edit-title-container{margin-bottom:20px}.rtmedia-media-edit .rtmedia-single-edit-title-container .rtmedia-title,#buddypress .rtmedia-media-edit .rtmedia-single-edit-title-container .rtmedia-title{margin:0}.rtmedia-media-edit .rtmedia-edit-title,#buddypress .rtmedia-media-edit .rtmedia-edit-title{margin-bottom:15px}.rtmedia-media-edit .rtmedia-edit-privacy,#buddypress .rtmedia-media-edit .rtmedia-edit-privacy{margin-bottom:10px}.rtmedia-media-edit .rtmedia-editor-description>label,#buddypress .rtmedia-media-edit .rtmedia-editor-description>label{display:block;line-height:24px}.rtmedia-media-edit .rtmedia-editor-description .rtmedia-desc-textarea,#buddypress .rtmedia-media-edit .rtmedia-editor-description .rtmedia-desc-textarea{width:100%;display:inline-block;padding:5px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-menu,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-menu{margin-bottom:15px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-crop-wrap,.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-group>p,.rtmedia-media-edit .rtmedia-image-editor-cotnainer .wp_attachment_image .thumbnail,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-crop-wrap,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-group>p,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .wp_attachment_image .thumbnail{margin-bottom:10px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .hidden,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .hidden{display:none}.rtmedia-media-edit .rtmedia-image-editor-cotnainer hr,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer hr{margin:15px 0 25px 0}.rtmedia-media-edit #rtmedia-image-editor-cotnainer .imgedit-wrap td,#buddypress .rtmedia-media-edit #rtmedia-image-editor-cotnainer .imgedit-wrap td{vertical-align:top}.rtmedia-container #rtm-media-options,.rtmedia-activity-container #rtm-media-options,#buddypress div.rtmedia-activity-container #rtm-media-options,.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{line-height:30px}.rtmedia-container #rtm-media-options [class^="icon-"],.rtmedia-activity-container #rtm-media-options [class^="icon-"],.rtmedia-container #rtm-media-options [class*=" icon-"],.rtmedia-activity-container #rtm-media-options [class*=" icon-"],.rtmedia-container [class^="icon-"],.rtmedia-activity-container [class^="icon-"],#buddypress div.rtmedia-activity-container [class^="icon-"],.rtmedia-container [class*=" icon-"],.rtmedia-activity-container [class*=" icon-"],#buddypress div.rtmedia-activity-container [class*=" icon-"]{font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;cursor:pointer;padding:0;border:none}.rtmedia-container #rtm-media-options [class^="icon-"].icon-2x,.rtmedia-activity-container #rtm-media-options [class^="icon-"].icon-2x,.rtmedia-container #rtm-media-options [class*=" icon-"].icon-2x,.rtmedia-activity-container #rtm-media-options [class*=" icon-"].icon-2x,.rtmedia-container [class^="icon-"].icon-2x,.rtmedia-activity-container [class^="icon-"].icon-2x,#buddypress div.rtmedia-activity-container [class^="icon-"].icon-2x,.rtmedia-container [class*=" icon-"].icon-2x,.rtmedia-activity-container [class*=" icon-"].icon-2x,#buddypress div.rtmedia-activity-container [class*=" icon-"].icon-2x{font-size:1.6em}.rtmedia-container #rtm-media-options [class^="icon-"].icon-3x,.rtmedia-activity-container #rtm-media-options [class^="icon-"].icon-3x,.rtmedia-container #rtm-media-options [class*=" icon-"].icon-3x,.rtmedia-activity-container #rtm-media-options [class*=" icon-"].icon-3x,.rtmedia-container [class^="icon-"].icon-3x,.rtmedia-activity-container [class^="icon-"].icon-3x,#buddypress div.rtmedia-activity-container [class^="icon-"].icon-3x,.rtmedia-container [class*=" icon-"].icon-3x,.rtmedia-activity-container [class*=" icon-"].icon-3x,#buddypress div.rtmedia-activity-container [class*=" icon-"].icon-3x{font-size:3em}.rtmedia-container #rtm-media-options [class^="icon-"]:visited,.rtmedia-activity-container #rtm-media-options [class^="icon-"]:visited,.rtmedia-container #rtm-media-options [class*=" icon-"]:visited,.rtmedia-activity-container #rtm-media-options [class*=" icon-"]:visited,.rtmedia-container [class^="icon-"]:visited,.rtmedia-activity-container [class^="icon-"]:visited,#buddypress div.rtmedia-activity-container [class^="icon-"]:visited,.rtmedia-container [class*=" icon-"]:visited,.rtmedia-activity-container [class*=" icon-"]:visited,#buddypress div.rtmedia-activity-container [class*=" icon-"]:visited{color:#444444}.rtmedia-container #rtm-media-options [class^="icon-"]:hover,.rtmedia-activity-container #rtm-media-options [class^="icon-"]:hover,.rtmedia-container #rtm-media-options [class*=" icon-"]:hover,.rtmedia-activity-container #rtm-media-options [class*=" icon-"]:hover,.rtmedia-container [class^="icon-"]:hover,.rtmedia-activity-container [class^="icon-"]:hover,#buddypress div.rtmedia-activity-container [class^="icon-"]:hover,.rtmedia-container [class*=" icon-"]:hover,.rtmedia-activity-container [class*=" icon-"]:hover,#buddypress div.rtmedia-activity-container [class*=" icon-"]:hover{background:none}.rtmedia-container #rtm-media-options .icon-remove,.rtmedia-activity-container #rtm-media-options .icon-remove,.rtmedia-container .icon-remove,.rtmedia-activity-container .icon-remove,#buddypress div.rtmedia-activity-container .icon-remove{color:red}#rtm-media-options{text-align:right}#rtm-media-options [class^="icon-"],#rtm-media-options [class*=" icon-"]{margin-left:10px;color:#444444}#rtm-media-options .rtmedia-upload-media-link,#rtm-media-options i,#rtm-media-options a,#rtm-media-options button,#rtm-media-options span{font-size:16px;cursor:pointer;color:#444444;text-decoration:none}#rtm-media-options .primary,#rtm-media-options .primary i{color:#3475BA}#rtm-media-options .rtmedia-delete-album{margin-left:0}.rtmedia-inline{display:inline}.rtmedia-container .rtMedia-queue-list,.rtmedia-activity-container .rtMedia-queue-list,#buddypress div.rtmedia-activity-container .rtMedia-queue-list{margin-bottom:10px;line-height:20px;width:100%}.rtmedia-container .rtMedia-queue-list tr td,.rtmedia-activity-container .rtMedia-queue-list tr td,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr td,.rtmedia-container .rtMedia-queue-list tr th,.rtmedia-activity-container .rtMedia-queue-list tr th,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr th{padding:3px 8px}.rtmedia-container .rtMedia-queue-list tr,.rtmedia-activity-container .rtMedia-queue-list tr,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr{color:#333}.rtmedia-container .rtMedia-queue-list tr>td.close,.rtmedia-activity-container .rtMedia-queue-list tr>td.close,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr>td.close{text-align:right}.rtmedia-container .rtMedia-queue-list tr>td.plupload_file_size,.rtmedia-activity-container .rtMedia-queue-list tr>td.plupload_file_size,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr>td.plupload_file_size{text-transform:uppercase}.rtmedia-container .rtMedia-queue-list tr.upload-waiting,.rtmedia-activity-container .rtMedia-queue-list tr.upload-waiting,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-waiting{background-color:#FFFFCC;border-bottom:1px solid #ffeca0}.rtmedia-container .rtMedia-queue-list tr.upload-error,.rtmedia-activity-container .rtMedia-queue-list tr.upload-error,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-error{background-color:#ffe5e5;border-bottom:1px solid #ffcccc}.rtmedia-container .rtMedia-queue-list tr.upload-success,.rtmedia-activity-container .rtMedia-queue-list tr.upload-success,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-success,.rtmedia-container .rtMedia-queue-list tr.upload-progress,.rtmedia-activity-container .rtMedia-queue-list tr.upload-progress,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-progress{background-color:#C2FAC1;border-bottom:1px solid #8EE888}.rtmedia-container .rtMedia-queue-list .plupload_media_edit a,.rtmedia-activity-container .rtMedia-queue-list .plupload_media_edit a,#buddypress div.rtmedia-activity-container .rtMedia-queue-list .plupload_media_edit a{text-decoration:none;color:#181818}#rtm-drop-files-title{font-size:24px;text-align:center;margin:-80px 0 40px 0;z-index:0;display:none}.rtm-drag-drop-active{border:4px dashed green !important;opacity:0.5;height:100%;display:block;z-index:9999}.drag-drop p{margin:10px 0}#drag-drop-title{position:absolute;margin-top:-30px;z-index:0}#rtm-upload-start-notice{display:none}#rtm-upload-start-notice>span{color:red;font-size:14px;line-height:20px}#rtm-media-gallery-uploader{display:none;margin-bottom:20px}#rtm-gallery-title-container{margin:0 0 15px 0}#rtm-gallery-title-container .rtm-gallery-title{display:inline-block;margin:0;overflow:hidden;vertical-align:bottom;padding-left:0;padding-right:0}#rtm-gallery-title-container #rtm-media-options{padding:5px 0;display:inline-block}#rtm-gallery-title-container #rtm-media-options .click-nav{float:none}#rtm-gallery-title-container #rtm-media-options .click-nav .clicker,#rtm-gallery-title-container #rtm-media-options .click-nav .clicker>i{font-size:16px}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input{border:none;padding:2px 5px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background:none;color:#fff;display:block;width:100%;text-align:left;font-size:13px;line-height:24px}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input:hover{background-color:#fff;color:#37454D}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input:hover i{color:#37454D}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li i{font-size:13px;color:#fff}.rtmedia-container ul#rtmedia_comment_ul li,.rtmedia-activity-container ul#rtmedia_comment_ul li{list-style:none;background:#EDEFF4;margin:0 0 2px 0;padding:5px;width:100%;position:relative;word-wrap:break;line-height:20px}.rtmedia-container ul#rtmedia_comment_ul li.rtmedia-no-comments,.rtmedia-activity-container ul#rtmedia_comment_ul li.rtmedia-no-comments{padding:5px;font-size:12px}.rtmedia-container ul#rtmedia_comment_ul li:hover .rtmedia-delete-comment,.rtmedia-activity-container ul#rtmedia_comment_ul li:hover .rtmedia-delete-comment{display:block}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-details,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-details{overflow:hidden;margin:0;padding:0}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic{float:left;margin:0 10px 0 0;padding:2px 0 0 2px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic img,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic img{height:35px !important;width:35px !important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author{line-height:18px;font-size:13px;margin-right:5px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author a,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author a{color:#3B5998;font-weight:bold;text-decoration:none;line-height:18px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author a:hover,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author a:hover{text-decoration:underline}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-content,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-content{line-height:16px;font-size:13px;padding-right:5px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-date,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-date{display:block;font-size:11px;color:#808080}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-delete-comment,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-delete-comment{text-decoration:none;position:absolute;right:0;top:0;color:#3B59A1;display:none;cursor:pointer}.rtmedia-item-comments .rt_media_comment_form textarea{width:100%;font-size:13px;height:50px}.mfp-content{width:90%}.mfp-content #buddypress .rtm-lightbox-container{background:#333;position:relative;-moz-box-shadow:0 0 10px rgba(0,0,0,0.5);-webkit-box-shadow:0 0 10px rgba(0,0,0,0.5);box-shadow:0 0 10px rgba(0,0,0,0.5);border:1px solid #222222}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media .tagcontainer{display:inline-block;max-width:calc(100% - 4px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media .tagcontainer img{max-height:calc(100% - 4px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta{background:#fff;overflow:hidden;padding:20px 0 0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents{max-height:100%;overflow-x:hidden;overflow-y:auto;padding:0 20px 0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents.logged-in{height:calc(97% - 80px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-media-title{font-size:16px;line-height:22px;margin:5px 0 10px 0}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-media-description{font-size:13px;line-height:20px;margin-bottom:10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtm-like-comments-info:before{top:13px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-content{font-size:12px;line-height:18px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-date{font-size:11px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-author{font-size:13px;line-height:18px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .username{padding:0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .userprofile{padding:0 10px 10px 0}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .userprofile .avatar{width:40px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments{position:absolute;bottom:10px;width:95%;padding:4px;background-color:#EDEFF4}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments .row{background:none}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments textarea{min-height:30px;max-height:40px;font-size:12px;line-height:14px;padding:4px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments .rt_media_comment_submit{background-color:#5B74A8;border-color:#29447E #1A356E;color:#FFFFFF;font-weight:bold}.mfp-content #buddypress .rtm-lightbox-container .rtm-mfp-close .mfp-close{height:20px;width:24px;font-size:20px;color:grey;line-height:20px;position:absolute;right:0;z-index:2;top:0;cursor:pointer;font-weight:bold}.mfp-content #buddypress .rtm-lightbox-container .mfp-arrow{background:none;border:none;display:none}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container{padding:0 !important}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .mfp-arrow,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .rtm-ltb-title-container,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .rtm-ltb-action-container{display:block;z-index:99}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container{background-color:rgba(0,0,0,0.6);padding:0 10px;color:#fff;position:absolute;width:100%;display:none}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions{display:inline-block;vertical-align:middle;text-align:right}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions form{display:inline}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .click-nav{float:right;margin-right:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button{font-weight:bold;color:#fff;font-size:12px;opacity:0.7;padding:4px 8px}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button:hover{opacity:1}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options{background-color:white}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options:before{border-color:transparent transparent #fff}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li{display:block}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons{width:100%;color:#000}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons:hover{color:#21759B}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container{top:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title{font-size:14px;width:55%;overflow:hidden;float:left;line-height:30px;max-height:30px}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title a{text-decoration:none;color:#fff;opacity:0.7}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title a:hover{opacity:1}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title span{opacity:0.5}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-50,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-100{float:left;overflow:hidden}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-50{max-width:50%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-100{max-width:100%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-album-name{max-width:50%;display:inline-block;overflow:hidden}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions{text-align:right;width:44%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container{bottom:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions{text-align:right;display:inline-block;max-width:69%;float:right}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtm-ltb-gallery-title{display:inline-block;width:30%}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-content #buddypress .rtm-lightbox-container #rtm-mejs-video-container{max-width:100%}.mfp-content #buddypress .rtm-lightbox-container #rtm-mejs-video-container{display:inline-block;vertical-align:middle}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio{display:inline-block;max-width:400px}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls{margin-left:25px;width:79%}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls .mejs-time-rail{width:134px}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls .mejs-time-rail .mejs-time-total{width:124px}.rtmedia-admin-notice{padding:4px;text-align:center;margin:2px 0}.rtmedia-info{color:green}.rtmedia-warning{color:red}.mfp-content #rtmedia-single-media-container .wp-audio-shortcode{margin-left:30px}#rtm-media-options .click-nav{position:relative;float:left;margin-right:10px}.rtm-lightbox-container #rtm-media-options-list.click-nav{position:relative}.rtm-lightbox-container #rtm-media-options-list ul{left:-85px}#rtm-media-options ul,.rtm-lightbox-container #rtm-media-options-list ul{position:absolute;right:0;width:170px;z-index:30;padding:10px 5px;background-color:#37454D;margin-top:12px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}#rtm-media-options ul:before,.rtm-lightbox-container #rtm-media-options-list ul:before{content:'';border-width:12px;border-style:inset inset solid;display:block;position:absolute;z-index:9;top:-24px;right:20px;border-color:transparent transparent #37454d}#rtm-media-options ul .clicker,.rtm-lightbox-container #rtm-media-options-list ul .clicker{position:relative}#rtm-media-options ul li,.rtm-lightbox-container #rtm-media-options-list ul li{padding:0 5px;list-style:none}#rtm-media-options ul li form,.rtm-lightbox-container #rtm-media-options-list ul li form{display:block}#rtm-media-options ul li .rtmedia-action-buttons,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons{display:block;padding:8px;color:#fff;width:100%;text-align:left;margin:0;font-size:12px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}#rtm-media-options ul li .rtmedia-action-buttons:hover,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons:hover{background-color:#EDEFF4;color:#2284B5}.click-nav .no-js ul{display:none}.click-nav .no-js:hover ul{display:block}.morecontent span{display:none}.rtmedia-footer-link{text-align:center;padding:7px}#bp-default .rtmedia-container embed,#bp-default .rtmedia-activity-container embed{height:100%}#bp-default .rtmedia-container .me-plugin,#bp-default .rtmedia-activity-container .me-plugin{height:100%}#bp-default .rtmedia-activity-container .mejs-overlay-button{margin-left:-50px}.rtmedia-save-album{margin-top:15px}.rtmedia-popup{position:relative;background:#FFF;padding:20px;width:auto;max-width:600px;margin:20px auto}.rtmedia-popup .rtm-modal-title{font-size:24px;line-height:24px;margin-bottom:30px;margin-top:0}.rtmedia-popup .rtm-input-medium{width:55%}.rtmedia-popup input,.rtmedia-popup select{margin-right:10px}.rtmedia-popup p{margin-bottom:10px}.rtmedia-popup label{min-width:90px;display:inline-block}.rtmedia-popup>div button{font-size:13px;color:#777;padding:6px 14px;background:#fff;border:1px solid #c1c1c1}.rtmedia-popup>div button:hover{background:#EDEDED}#buddypress #whats-new-options .rtmedia-plupload-container{float:left}#buddypress #whats-new-options #rtmedia-whts-new-upload-container{margin-top:12px}#buddypress #whats-new-options #rtmedia-add-media-button-post-update{margin-top:12px;float:left;margin-right:20px}.rtmedia-list.masonry .rtmedia-list-item,.rtmedia-list.masonry .rtmedia-list-item .rtmedia-item-thumbnail{display:block;position:relative}.rtmedia-list.masonry .rtmedia-list-item:hover .rtmedia-item-title,.rtmedia-list.masonry .rtmedia-list-item .rtmedia-item-thumbnail:hover .rtmedia-item-title{display:block}.rtmedia-list.masonry .rtmedia-item-title{position:absolute;bottom:0;max-width:100%;display:none;width:100%;background-color:rgba(0,0,0,0.6)}.rtmedia-list.masonry .rtmedia-item-title h4{font-size:inherit;color:#ffffff}.rtmedia-list.masonry .rtmedia-item-title a{color:#ffffff}.rtmedia-list.masonry .rtmedia-item-title a:hover{color:#ffffff}.rtmedia-list.masonry .rtmedia-list-item{margin:3px}.rtmedia-list.masonry .rtmedia-list-item a h4{font-size:inherit;padding:5px 2px}
|
1 |
+
.rtm-link-button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button,#rtm-media-options ul li .rtmedia-action-buttons,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons{border:none;background:none;text-decoration:none}.rtm-top-notch,.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info:before,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before{content:'';border-width:5px;border-style:inset inset solid;display:block;position:absolute;border-color:transparent transparent #edeff4}.rtm-primary-button,.rtmedia-container .drag-drop .start-media-upload,.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress .rtmedia-container .rtmedia-uploader .drag-drop .start-media-upload,#buddypress .rtmedia-activity-container .rtmedia-uploader .drag-drop .start-media-upload{background-color:#3475BA;border-radius:5px 5px 5px 5px;text-transform:uppercase;box-shadow:0 0 0 rgba(255,255,255,0) inset;transition:background-color 300ms ease-out 0s;color:white;border:none;padding:10px 20px;background-image:none}.rtm-primary-button:hover,.rtmedia-container .drag-drop .start-media-upload:hover,.rtmedia-activity-container .drag-drop .start-media-upload:hover,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload:hover,#buddypress .rtmedia-container .rtmedia-uploader .drag-drop .start-media-upload:hover,#buddypress .rtmedia-activity-container .rtmedia-uploader .drag-drop .start-media-upload:hover{background-color:#306BAA}.rtm-primary-font-color{color:#3475ba}#rtmedia-add-media-button-post-update{float:left;margin-top:12px;margin-right:20px}.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{@import url("//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700");;padding:5px;margin:0;clear:left}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body,.rtmedia-container div,.rtmedia-activity-container div,#buddypress div.rtmedia-activity-container div,.rtmedia-container span,.rtmedia-activity-container span,#buddypress div.rtmedia-activity-container span,.rtmedia-container applet,.rtmedia-activity-container applet,#buddypress div.rtmedia-activity-container applet,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container iframe,.rtmedia-activity-container iframe,#buddypress div.rtmedia-activity-container iframe,.rtmedia-container h1,.rtmedia-activity-container h1,#buddypress div.rtmedia-activity-container h1,.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2,.rtmedia-container h3,.rtmedia-activity-container h3,#buddypress div.rtmedia-activity-container h3,.rtmedia-container h4,.rtmedia-activity-container h4,#buddypress div.rtmedia-activity-container h4,.rtmedia-container h5,.rtmedia-activity-container h5,#buddypress div.rtmedia-activity-container h5,.rtmedia-container h6,.rtmedia-activity-container h6,#buddypress div.rtmedia-activity-container h6,.rtmedia-container p,.rtmedia-activity-container p,#buddypress div.rtmedia-activity-container p,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote,.rtmedia-container pre,.rtmedia-activity-container pre,#buddypress div.rtmedia-activity-container pre,.rtmedia-container a,.rtmedia-activity-container a,#buddypress div.rtmedia-activity-container a,.rtmedia-container abbr,.rtmedia-activity-container abbr,#buddypress div.rtmedia-activity-container abbr,.rtmedia-container acronym,.rtmedia-activity-container acronym,#buddypress div.rtmedia-activity-container acronym,.rtmedia-container address,.rtmedia-activity-container address,#buddypress div.rtmedia-activity-container address,.rtmedia-container big,.rtmedia-activity-container big,#buddypress div.rtmedia-activity-container big,.rtmedia-container cite,.rtmedia-activity-container cite,#buddypress div.rtmedia-activity-container cite,.rtmedia-container code,.rtmedia-activity-container code,#buddypress div.rtmedia-activity-container code,.rtmedia-container del,.rtmedia-activity-container del,#buddypress div.rtmedia-activity-container del,.rtmedia-container dfn,.rtmedia-activity-container dfn,#buddypress div.rtmedia-activity-container dfn,.rtmedia-container em,.rtmedia-activity-container em,#buddypress div.rtmedia-activity-container em,.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container ins,.rtmedia-activity-container ins,#buddypress div.rtmedia-activity-container ins,.rtmedia-container kbd,.rtmedia-activity-container kbd,#buddypress div.rtmedia-activity-container kbd,.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container s,.rtmedia-activity-container s,#buddypress div.rtmedia-activity-container s,.rtmedia-container samp,.rtmedia-activity-container samp,#buddypress div.rtmedia-activity-container samp,.rtmedia-container small,.rtmedia-activity-container small,#buddypress div.rtmedia-activity-container small,.rtmedia-container strike,.rtmedia-activity-container strike,#buddypress div.rtmedia-activity-container strike,.rtmedia-container strong,.rtmedia-activity-container strong,#buddypress div.rtmedia-activity-container strong,.rtmedia-container sub,.rtmedia-activity-container sub,#buddypress div.rtmedia-activity-container sub,.rtmedia-container sup,.rtmedia-activity-container sup,#buddypress div.rtmedia-activity-container sup,.rtmedia-container tt,.rtmedia-activity-container tt,#buddypress div.rtmedia-activity-container tt,.rtmedia-container var,.rtmedia-activity-container var,#buddypress div.rtmedia-activity-container var,.rtmedia-container b,.rtmedia-activity-container b,#buddypress div.rtmedia-activity-container b,.rtmedia-container u,.rtmedia-activity-container u,#buddypress div.rtmedia-activity-container u,.rtmedia-container i,.rtmedia-activity-container i,#buddypress div.rtmedia-activity-container i,.rtmedia-container center,.rtmedia-activity-container center,#buddypress div.rtmedia-activity-container center,.rtmedia-container dl,.rtmedia-activity-container dl,#buddypress div.rtmedia-activity-container dl,.rtmedia-container dt,.rtmedia-activity-container dt,#buddypress div.rtmedia-activity-container dt,.rtmedia-container dd,.rtmedia-activity-container dd,#buddypress div.rtmedia-activity-container dd,.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul,.rtmedia-container li,.rtmedia-activity-container li,#buddypress div.rtmedia-activity-container li,.rtmedia-container fieldset,.rtmedia-activity-container fieldset,#buddypress div.rtmedia-activity-container fieldset,.rtmedia-container form,.rtmedia-activity-container form,#buddypress div.rtmedia-activity-container form,.rtmedia-container label,.rtmedia-activity-container label,#buddypress div.rtmedia-activity-container label,.rtmedia-container legend,.rtmedia-activity-container legend,#buddypress div.rtmedia-activity-container legend,.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table,.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container tbody,.rtmedia-activity-container tbody,#buddypress div.rtmedia-activity-container tbody,.rtmedia-container tfoot,.rtmedia-activity-container tfoot,#buddypress div.rtmedia-activity-container tfoot,.rtmedia-container thead,.rtmedia-activity-container thead,#buddypress div.rtmedia-activity-container thead,.rtmedia-container tr,.rtmedia-activity-container tr,#buddypress div.rtmedia-activity-container tr,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td,.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container canvas,.rtmedia-activity-container canvas,#buddypress div.rtmedia-activity-container canvas,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container output,.rtmedia-activity-container output,#buddypress div.rtmedia-activity-container output,.rtmedia-container ruby,.rtmedia-activity-container ruby,#buddypress div.rtmedia-activity-container ruby,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary,.rtmedia-container time,.rtmedia-activity-container time,#buddypress div.rtmedia-activity-container time,.rtmedia-container mark,.rtmedia-activity-container mark,#buddypress div.rtmedia-activity-container mark,.rtmedia-container audio,.rtmedia-activity-container audio,#buddypress div.rtmedia-activity-container audio,.rtmedia-container video,.rtmedia-activity-container video,#buddypress div.rtmedia-activity-container video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html{line-height:1}.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul{list-style:none}.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table{border-collapse:collapse;border-spacing:0}.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td{text-align:left;font-weight:normal;vertical-align:middle}.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote{quotes:none}.rtmedia-container q:before,.rtmedia-activity-container q:before,#buddypress div.rtmedia-activity-container q:before,.rtmedia-container q:after,.rtmedia-activity-container q:after,#buddypress div.rtmedia-activity-container q:after,.rtmedia-container blockquote:before,.rtmedia-activity-container blockquote:before,#buddypress div.rtmedia-activity-container blockquote:before,.rtmedia-container blockquote:after,.rtmedia-activity-container blockquote:after,#buddypress div.rtmedia-activity-container blockquote:after{content:"";content:none}.rtmedia-container a img,.rtmedia-activity-container a img,#buddypress div.rtmedia-activity-container a img{border:none}.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container main,.rtmedia-activity-container main,#buddypress div.rtmedia-activity-container main,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary{display:block}.rtmedia-container meta.foundation-mq-small,.rtmedia-activity-container meta.foundation-mq-small,#buddypress div.rtmedia-activity-container meta.foundation-mq-small{font-family:"/only screen and (max-width: 40em)/";width:0em}.rtmedia-container meta.foundation-mq-medium,.rtmedia-activity-container meta.foundation-mq-medium,#buddypress div.rtmedia-activity-container meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.063em) and (max-width:64em)/";width:40.063em}.rtmedia-container meta.foundation-mq-large,.rtmedia-activity-container meta.foundation-mq-large,#buddypress div.rtmedia-activity-container meta.foundation-mq-large{font-family:"/only screen and (min-width:64.063em)/";width:64.063em}.rtmedia-container meta.foundation-mq-xlarge,.rtmedia-activity-container meta.foundation-mq-xlarge,#buddypress div.rtmedia-activity-container meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.063em)/";width:90.063em}.rtmedia-container meta.foundation-mq-xxlarge,.rtmedia-activity-container meta.foundation-mq-xxlarge,#buddypress div.rtmedia-activity-container meta.foundation-mq-xxlarge{font-family:"/only screen and (min-width:120.063em)/";width:120.063em}.rtmedia-container *,.rtmedia-activity-container *,#buddypress div.rtmedia-activity-container *,.rtmedia-container *:before,.rtmedia-activity-container *:before,#buddypress div.rtmedia-activity-container *:before,.rtmedia-container *:after,.rtmedia-activity-container *:after,#buddypress div.rtmedia-activity-container *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{font-size:100%}.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{background:#fff;color:#222;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default}.rtmedia-container a:hover,.rtmedia-activity-container a:hover,#buddypress div.rtmedia-activity-container a:hover{cursor:pointer}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{max-width:100%;height:auto}.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{height:100%}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{-ms-interpolation-mode:bicubic}.rtmedia-container #map_canvas img,.rtmedia-activity-container #map_canvas img,.rtmedia-container #map_canvas embed,.rtmedia-activity-container #map_canvas embed,.rtmedia-container #map_canvas object,.rtmedia-activity-container #map_canvas object,.rtmedia-container .map_canvas img,.rtmedia-activity-container .map_canvas img,#buddypress div.rtmedia-activity-container .map_canvas img,.rtmedia-container .map_canvas embed,.rtmedia-activity-container .map_canvas embed,#buddypress div.rtmedia-activity-container .map_canvas embed,.rtmedia-container .map_canvas object,.rtmedia-activity-container .map_canvas object,#buddypress div.rtmedia-activity-container .map_canvas object{max-width:none !important}.rtmedia-container .left,.rtmedia-activity-container .left,#buddypress div.rtmedia-activity-container .left{float:left !important}.rtmedia-container .right,.rtmedia-activity-container .right,#buddypress div.rtmedia-activity-container .right{float:right !important}.rtmedia-container .clearfix,.rtmedia-activity-container .clearfix,#buddypress div.rtmedia-activity-container .clearfix{*zoom:1}.rtmedia-container .clearfix:before,.rtmedia-activity-container .clearfix:before,#buddypress div.rtmedia-activity-container .clearfix:before,.rtmedia-container .clearfix:after,.rtmedia-activity-container .clearfix:after,#buddypress div.rtmedia-activity-container .clearfix:after{content:" ";display:table}.rtmedia-container .clearfix:after,.rtmedia-activity-container .clearfix:after,#buddypress div.rtmedia-activity-container .clearfix:after{clear:both}.rtmedia-container .text-left,.rtmedia-activity-container .text-left,#buddypress div.rtmedia-activity-container .text-left{text-align:left !important}.rtmedia-container .text-right,.rtmedia-activity-container .text-right,#buddypress div.rtmedia-activity-container .text-right{text-align:right !important}.rtmedia-container .text-center,.rtmedia-activity-container .text-center,#buddypress div.rtmedia-activity-container .text-center{text-align:center !important}.rtmedia-container .text-justify,.rtmedia-activity-container .text-justify,#buddypress div.rtmedia-activity-container .text-justify{text-align:justify !important}.rtmedia-container .hide,.rtmedia-activity-container .hide,#buddypress div.rtmedia-activity-container .hide{display:none}.rtmedia-container .antialiased,.rtmedia-activity-container .antialiased,#buddypress div.rtmedia-activity-container .antialiased{-webkit-font-smoothing:antialiased}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{display:inline-block;vertical-align:middle}.rtmedia-container textarea,.rtmedia-activity-container textarea,#buddypress div.rtmedia-activity-container textarea{height:auto;min-height:50px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5rem;*zoom:1}.rtmedia-container .row:before,.rtmedia-activity-container .row:before,#buddypress div.rtmedia-activity-container .row:before,.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{content:" ";display:table}.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{clear:both}.rtmedia-container .row.collapse>.column,.rtmedia-activity-container .row.collapse>.column,#buddypress div.rtmedia-activity-container .row.collapse>.column,.rtmedia-container .row.collapse>.columns,.rtmedia-activity-container .row.collapse>.columns,#buddypress div.rtmedia-activity-container .row.collapse>.columns{position:relative;padding-left:0;padding-right:0;float:left}.rtmedia-container .row.collapse .row,.rtmedia-activity-container .row.collapse .row,#buddypress div.rtmedia-activity-container .row.collapse .row{margin-left:0;margin-right:0}.rtmedia-container .row .row,.rtmedia-activity-container .row .row,#buddypress div.rtmedia-activity-container .row .row{width:auto;margin-left:-0.9375rem;margin-right:-0.9375rem;margin-top:0;margin-bottom:0;max-width:none;*zoom:1}.rtmedia-container .row .row:before,.rtmedia-activity-container .row .row:before,#buddypress div.rtmedia-activity-container .row .row:before,.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{content:" ";display:table}.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{clear:both}.rtmedia-container .row .row.collapse,.rtmedia-activity-container .row .row.collapse,#buddypress div.rtmedia-activity-container .row .row.collapse{width:auto;margin:0;max-width:none;*zoom:1}.rtmedia-container .row .row.collapse:before,.rtmedia-activity-container .row .row.collapse:before,#buddypress div.rtmedia-activity-container .row .row.collapse:before,.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{content:" ";display:table}.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{clear:both}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;width:100%;float:left}@media only screen{.rtmedia-container .small-push-1,.rtmedia-activity-container .small-push-1,#buddypress div.rtmedia-activity-container .small-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .small-pull-1,.rtmedia-activity-container .small-pull-1,#buddypress div.rtmedia-activity-container .small-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .small-push-2,.rtmedia-activity-container .small-push-2,#buddypress div.rtmedia-activity-container .small-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .small-pull-2,.rtmedia-activity-container .small-pull-2,#buddypress div.rtmedia-activity-container .small-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .small-push-3,.rtmedia-activity-container .small-push-3,#buddypress div.rtmedia-activity-container .small-push-3{position:relative;left:25%;right:auto}.rtmedia-container .small-pull-3,.rtmedia-activity-container .small-pull-3,#buddypress div.rtmedia-activity-container .small-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .small-push-4,.rtmedia-activity-container .small-push-4,#buddypress div.rtmedia-activity-container .small-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .small-pull-4,.rtmedia-activity-container .small-pull-4,#buddypress div.rtmedia-activity-container .small-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .small-push-5,.rtmedia-activity-container .small-push-5,#buddypress div.rtmedia-activity-container .small-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .small-pull-5,.rtmedia-activity-container .small-pull-5,#buddypress div.rtmedia-activity-container .small-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .small-push-6,.rtmedia-activity-container .small-push-6,#buddypress div.rtmedia-activity-container .small-push-6{position:relative;left:50%;right:auto}.rtmedia-container .small-pull-6,.rtmedia-activity-container .small-pull-6,#buddypress div.rtmedia-activity-container .small-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .small-push-7,.rtmedia-activity-container .small-push-7,#buddypress div.rtmedia-activity-container .small-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .small-pull-7,.rtmedia-activity-container .small-pull-7,#buddypress div.rtmedia-activity-container .small-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .small-push-8,.rtmedia-activity-container .small-push-8,#buddypress div.rtmedia-activity-container .small-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .small-pull-8,.rtmedia-activity-container .small-pull-8,#buddypress div.rtmedia-activity-container .small-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .small-push-9,.rtmedia-activity-container .small-push-9,#buddypress div.rtmedia-activity-container .small-push-9{position:relative;left:75%;right:auto}.rtmedia-container .small-pull-9,.rtmedia-activity-container .small-pull-9,#buddypress div.rtmedia-activity-container .small-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .small-push-10,.rtmedia-activity-container .small-push-10,#buddypress div.rtmedia-activity-container .small-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .small-pull-10,.rtmedia-activity-container .small-pull-10,#buddypress div.rtmedia-activity-container .small-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .small-push-11,.rtmedia-activity-container .small-push-11,#buddypress div.rtmedia-activity-container .small-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .small-pull-11,.rtmedia-activity-container .small-pull-11,#buddypress div.rtmedia-activity-container .small-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .small-1,.rtmedia-activity-container .small-1,#buddypress div.rtmedia-activity-container .small-1{position:relative;width:8.33333%}.rtmedia-container .small-2,.rtmedia-activity-container .small-2,#buddypress div.rtmedia-activity-container .small-2{position:relative;width:16.66667%}.rtmedia-container .small-3,.rtmedia-activity-container .small-3,#buddypress div.rtmedia-activity-container .small-3{position:relative;width:25%}.rtmedia-container .small-4,.rtmedia-activity-container .small-4,#buddypress div.rtmedia-activity-container .small-4{position:relative;width:33.33333%}.rtmedia-container .small-5,.rtmedia-activity-container .small-5,#buddypress div.rtmedia-activity-container .small-5{position:relative;width:41.66667%}.rtmedia-container .small-6,.rtmedia-activity-container .small-6,#buddypress div.rtmedia-activity-container .small-6{position:relative;width:50%}.rtmedia-container .small-7,.rtmedia-activity-container .small-7,#buddypress div.rtmedia-activity-container .small-7{position:relative;width:58.33333%}.rtmedia-container .small-8,.rtmedia-activity-container .small-8,#buddypress div.rtmedia-activity-container .small-8{position:relative;width:66.66667%}.rtmedia-container .small-9,.rtmedia-activity-container .small-9,#buddypress div.rtmedia-activity-container .small-9{position:relative;width:75%}.rtmedia-container .small-10,.rtmedia-activity-container .small-10,#buddypress div.rtmedia-activity-container .small-10{position:relative;width:83.33333%}.rtmedia-container .small-11,.rtmedia-activity-container .small-11,#buddypress div.rtmedia-activity-container .small-11{position:relative;width:91.66667%}.rtmedia-container .small-12,.rtmedia-activity-container .small-12,#buddypress div.rtmedia-activity-container .small-12{position:relative;width:100%}.rtmedia-container .small-offset-0,.rtmedia-activity-container .small-offset-0,#buddypress div.rtmedia-activity-container .small-offset-0{position:relative;margin-left:0%}.rtmedia-container .small-offset-1,.rtmedia-activity-container .small-offset-1,#buddypress div.rtmedia-activity-container .small-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .small-offset-2,.rtmedia-activity-container .small-offset-2,#buddypress div.rtmedia-activity-container .small-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .small-offset-3,.rtmedia-activity-container .small-offset-3,#buddypress div.rtmedia-activity-container .small-offset-3{position:relative;margin-left:25%}.rtmedia-container .small-offset-4,.rtmedia-activity-container .small-offset-4,#buddypress div.rtmedia-activity-container .small-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .small-offset-5,.rtmedia-activity-container .small-offset-5,#buddypress div.rtmedia-activity-container .small-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .small-offset-6,.rtmedia-activity-container .small-offset-6,#buddypress div.rtmedia-activity-container .small-offset-6{position:relative;margin-left:50%}.rtmedia-container .small-offset-7,.rtmedia-activity-container .small-offset-7,#buddypress div.rtmedia-activity-container .small-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .small-offset-8,.rtmedia-activity-container .small-offset-8,#buddypress div.rtmedia-activity-container .small-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .small-offset-9,.rtmedia-activity-container .small-offset-9,#buddypress div.rtmedia-activity-container .small-offset-9{position:relative;margin-left:75%}.rtmedia-container .small-offset-10,.rtmedia-activity-container .small-offset-10,#buddypress div.rtmedia-activity-container .small-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.small-centered,.rtmedia-activity-container .column.small-centered,#buddypress div.rtmedia-activity-container .column.small-centered,.rtmedia-container .columns.small-centered,.rtmedia-activity-container .columns.small-centered,#buddypress div.rtmedia-activity-container .columns.small-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.small-uncentered,.rtmedia-activity-container .column.small-uncentered,#buddypress div.rtmedia-activity-container .column.small-uncentered,.rtmedia-container .columns.small-uncentered,.rtmedia-activity-container .columns.small-uncentered,#buddypress div.rtmedia-activity-container .columns.small-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.small-uncentered.opposite,.rtmedia-activity-container .column.small-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.small-uncentered.opposite,.rtmedia-container .columns.small-uncentered.opposite,.rtmedia-activity-container .columns.small-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.small-uncentered.opposite{float:right !important}}@media only screen and (min-width: 40.063em){.rtmedia-container .medium-push-1,.rtmedia-activity-container .medium-push-1,#buddypress div.rtmedia-activity-container .medium-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .medium-pull-1,.rtmedia-activity-container .medium-pull-1,#buddypress div.rtmedia-activity-container .medium-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .medium-push-2,.rtmedia-activity-container .medium-push-2,#buddypress div.rtmedia-activity-container .medium-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .medium-pull-2,.rtmedia-activity-container .medium-pull-2,#buddypress div.rtmedia-activity-container .medium-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .medium-push-3,.rtmedia-activity-container .medium-push-3,#buddypress div.rtmedia-activity-container .medium-push-3{position:relative;left:25%;right:auto}.rtmedia-container .medium-pull-3,.rtmedia-activity-container .medium-pull-3,#buddypress div.rtmedia-activity-container .medium-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .medium-push-4,.rtmedia-activity-container .medium-push-4,#buddypress div.rtmedia-activity-container .medium-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .medium-pull-4,.rtmedia-activity-container .medium-pull-4,#buddypress div.rtmedia-activity-container .medium-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .medium-push-5,.rtmedia-activity-container .medium-push-5,#buddypress div.rtmedia-activity-container .medium-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .medium-pull-5,.rtmedia-activity-container .medium-pull-5,#buddypress div.rtmedia-activity-container .medium-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .medium-push-6,.rtmedia-activity-container .medium-push-6,#buddypress div.rtmedia-activity-container .medium-push-6{position:relative;left:50%;right:auto}.rtmedia-container .medium-pull-6,.rtmedia-activity-container .medium-pull-6,#buddypress div.rtmedia-activity-container .medium-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .medium-push-7,.rtmedia-activity-container .medium-push-7,#buddypress div.rtmedia-activity-container .medium-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .medium-pull-7,.rtmedia-activity-container .medium-pull-7,#buddypress div.rtmedia-activity-container .medium-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .medium-push-8,.rtmedia-activity-container .medium-push-8,#buddypress div.rtmedia-activity-container .medium-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .medium-pull-8,.rtmedia-activity-container .medium-pull-8,#buddypress div.rtmedia-activity-container .medium-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .medium-push-9,.rtmedia-activity-container .medium-push-9,#buddypress div.rtmedia-activity-container .medium-push-9{position:relative;left:75%;right:auto}.rtmedia-container .medium-pull-9,.rtmedia-activity-container .medium-pull-9,#buddypress div.rtmedia-activity-container .medium-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .medium-push-10,.rtmedia-activity-container .medium-push-10,#buddypress div.rtmedia-activity-container .medium-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .medium-pull-10,.rtmedia-activity-container .medium-pull-10,#buddypress div.rtmedia-activity-container .medium-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .medium-push-11,.rtmedia-activity-container .medium-push-11,#buddypress div.rtmedia-activity-container .medium-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .medium-pull-11,.rtmedia-activity-container .medium-pull-11,#buddypress div.rtmedia-activity-container .medium-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .medium-1,.rtmedia-activity-container .medium-1,#buddypress div.rtmedia-activity-container .medium-1{position:relative;width:8.33333%}.rtmedia-container .medium-2,.rtmedia-activity-container .medium-2,#buddypress div.rtmedia-activity-container .medium-2{position:relative;width:16.66667%}.rtmedia-container .medium-3,.rtmedia-activity-container .medium-3,#buddypress div.rtmedia-activity-container .medium-3{position:relative;width:25%}.rtmedia-container .medium-4,.rtmedia-activity-container .medium-4,#buddypress div.rtmedia-activity-container .medium-4{position:relative;width:33.33333%}.rtmedia-container .medium-5,.rtmedia-activity-container .medium-5,#buddypress div.rtmedia-activity-container .medium-5{position:relative;width:41.66667%}.rtmedia-container .medium-6,.rtmedia-activity-container .medium-6,#buddypress div.rtmedia-activity-container .medium-6{position:relative;width:50%}.rtmedia-container .medium-7,.rtmedia-activity-container .medium-7,#buddypress div.rtmedia-activity-container .medium-7{position:relative;width:58.33333%}.rtmedia-container .medium-8,.rtmedia-activity-container .medium-8,#buddypress div.rtmedia-activity-container .medium-8{position:relative;width:66.66667%}.rtmedia-container .medium-9,.rtmedia-activity-container .medium-9,#buddypress div.rtmedia-activity-container .medium-9{position:relative;width:75%}.rtmedia-container .medium-10,.rtmedia-activity-container .medium-10,#buddypress div.rtmedia-activity-container .medium-10{position:relative;width:83.33333%}.rtmedia-container .medium-11,.rtmedia-activity-container .medium-11,#buddypress div.rtmedia-activity-container .medium-11{position:relative;width:91.66667%}.rtmedia-container .medium-12,.rtmedia-activity-container .medium-12,#buddypress div.rtmedia-activity-container .medium-12{position:relative;width:100%}.rtmedia-container .medium-offset-0,.rtmedia-activity-container .medium-offset-0,#buddypress div.rtmedia-activity-container .medium-offset-0{position:relative;margin-left:0%}.rtmedia-container .medium-offset-1,.rtmedia-activity-container .medium-offset-1,#buddypress div.rtmedia-activity-container .medium-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .medium-offset-2,.rtmedia-activity-container .medium-offset-2,#buddypress div.rtmedia-activity-container .medium-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .medium-offset-3,.rtmedia-activity-container .medium-offset-3,#buddypress div.rtmedia-activity-container .medium-offset-3{position:relative;margin-left:25%}.rtmedia-container .medium-offset-4,.rtmedia-activity-container .medium-offset-4,#buddypress div.rtmedia-activity-container .medium-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .medium-offset-5,.rtmedia-activity-container .medium-offset-5,#buddypress div.rtmedia-activity-container .medium-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .medium-offset-6,.rtmedia-activity-container .medium-offset-6,#buddypress div.rtmedia-activity-container .medium-offset-6{position:relative;margin-left:50%}.rtmedia-container .medium-offset-7,.rtmedia-activity-container .medium-offset-7,#buddypress div.rtmedia-activity-container .medium-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .medium-offset-8,.rtmedia-activity-container .medium-offset-8,#buddypress div.rtmedia-activity-container .medium-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .medium-offset-9,.rtmedia-activity-container .medium-offset-9,#buddypress div.rtmedia-activity-container .medium-offset-9{position:relative;margin-left:75%}.rtmedia-container .medium-offset-10,.rtmedia-activity-container .medium-offset-10,#buddypress div.rtmedia-activity-container .medium-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.medium-centered,.rtmedia-activity-container .column.medium-centered,#buddypress div.rtmedia-activity-container .column.medium-centered,.rtmedia-container .columns.medium-centered,.rtmedia-activity-container .columns.medium-centered,#buddypress div.rtmedia-activity-container .columns.medium-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.medium-uncentered,.rtmedia-activity-container .column.medium-uncentered,#buddypress div.rtmedia-activity-container .column.medium-uncentered,.rtmedia-container .columns.medium-uncentered,.rtmedia-activity-container .columns.medium-uncentered,#buddypress div.rtmedia-activity-container .columns.medium-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.medium-uncentered.opposite,.rtmedia-activity-container .column.medium-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.medium-uncentered.opposite,.rtmedia-container .columns.medium-uncentered.opposite,.rtmedia-activity-container .columns.medium-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.medium-uncentered.opposite{float:right !important}.rtmedia-container .push-1,.rtmedia-activity-container .push-1,#buddypress div.rtmedia-activity-container .push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .pull-1,.rtmedia-activity-container .pull-1,#buddypress div.rtmedia-activity-container .pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .push-2,.rtmedia-activity-container .push-2,#buddypress div.rtmedia-activity-container .push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .pull-2,.rtmedia-activity-container .pull-2,#buddypress div.rtmedia-activity-container .pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .push-3,.rtmedia-activity-container .push-3,#buddypress div.rtmedia-activity-container .push-3{position:relative;left:25%;right:auto}.rtmedia-container .pull-3,.rtmedia-activity-container .pull-3,#buddypress div.rtmedia-activity-container .pull-3{position:relative;right:25%;left:auto}.rtmedia-container .push-4,.rtmedia-activity-container .push-4,#buddypress div.rtmedia-activity-container .push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .pull-4,.rtmedia-activity-container .pull-4,#buddypress div.rtmedia-activity-container .pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .push-5,.rtmedia-activity-container .push-5,#buddypress div.rtmedia-activity-container .push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .pull-5,.rtmedia-activity-container .pull-5,#buddypress div.rtmedia-activity-container .pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .push-6,.rtmedia-activity-container .push-6,#buddypress div.rtmedia-activity-container .push-6{position:relative;left:50%;right:auto}.rtmedia-container .pull-6,.rtmedia-activity-container .pull-6,#buddypress div.rtmedia-activity-container .pull-6{position:relative;right:50%;left:auto}.rtmedia-container .push-7,.rtmedia-activity-container .push-7,#buddypress div.rtmedia-activity-container .push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .pull-7,.rtmedia-activity-container .pull-7,#buddypress div.rtmedia-activity-container .pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .push-8,.rtmedia-activity-container .push-8,#buddypress div.rtmedia-activity-container .push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .pull-8,.rtmedia-activity-container .pull-8,#buddypress div.rtmedia-activity-container .pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .push-9,.rtmedia-activity-container .push-9,#buddypress div.rtmedia-activity-container .push-9{position:relative;left:75%;right:auto}.rtmedia-container .pull-9,.rtmedia-activity-container .pull-9,#buddypress div.rtmedia-activity-container .pull-9{position:relative;right:75%;left:auto}.rtmedia-container .push-10,.rtmedia-activity-container .push-10,#buddypress div.rtmedia-activity-container .push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .pull-10,.rtmedia-activity-container .pull-10,#buddypress div.rtmedia-activity-container .pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .push-11,.rtmedia-activity-container .push-11,#buddypress div.rtmedia-activity-container .push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .pull-11,.rtmedia-activity-container .pull-11,#buddypress div.rtmedia-activity-container .pull-11{position:relative;right:91.66667%;left:auto}}@media only screen and (min-width: 64.063em){.rtmedia-container .large-push-1,.rtmedia-activity-container .large-push-1,#buddypress div.rtmedia-activity-container .large-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .large-pull-1,.rtmedia-activity-container .large-pull-1,#buddypress div.rtmedia-activity-container .large-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .large-push-2,.rtmedia-activity-container .large-push-2,#buddypress div.rtmedia-activity-container .large-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .large-pull-2,.rtmedia-activity-container .large-pull-2,#buddypress div.rtmedia-activity-container .large-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .large-push-3,.rtmedia-activity-container .large-push-3,#buddypress div.rtmedia-activity-container .large-push-3{position:relative;left:25%;right:auto}.rtmedia-container .large-pull-3,.rtmedia-activity-container .large-pull-3,#buddypress div.rtmedia-activity-container .large-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .large-push-4,.rtmedia-activity-container .large-push-4,#buddypress div.rtmedia-activity-container .large-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .large-pull-4,.rtmedia-activity-container .large-pull-4,#buddypress div.rtmedia-activity-container .large-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .large-push-5,.rtmedia-activity-container .large-push-5,#buddypress div.rtmedia-activity-container .large-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .large-pull-5,.rtmedia-activity-container .large-pull-5,#buddypress div.rtmedia-activity-container .large-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .large-push-6,.rtmedia-activity-container .large-push-6,#buddypress div.rtmedia-activity-container .large-push-6{position:relative;left:50%;right:auto}.rtmedia-container .large-pull-6,.rtmedia-activity-container .large-pull-6,#buddypress div.rtmedia-activity-container .large-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .large-push-7,.rtmedia-activity-container .large-push-7,#buddypress div.rtmedia-activity-container .large-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .large-pull-7,.rtmedia-activity-container .large-pull-7,#buddypress div.rtmedia-activity-container .large-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .large-push-8,.rtmedia-activity-container .large-push-8,#buddypress div.rtmedia-activity-container .large-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .large-pull-8,.rtmedia-activity-container .large-pull-8,#buddypress div.rtmedia-activity-container .large-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .large-push-9,.rtmedia-activity-container .large-push-9,#buddypress div.rtmedia-activity-container .large-push-9{position:relative;left:75%;right:auto}.rtmedia-container .large-pull-9,.rtmedia-activity-container .large-pull-9,#buddypress div.rtmedia-activity-container .large-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .large-push-10,.rtmedia-activity-container .large-push-10,#buddypress div.rtmedia-activity-container .large-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .large-pull-10,.rtmedia-activity-container .large-pull-10,#buddypress div.rtmedia-activity-container .large-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .large-push-11,.rtmedia-activity-container .large-push-11,#buddypress div.rtmedia-activity-container .large-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .large-pull-11,.rtmedia-activity-container .large-pull-11,#buddypress div.rtmedia-activity-container .large-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .large-1,.rtmedia-activity-container .large-1,#buddypress div.rtmedia-activity-container .large-1{position:relative;width:8.33333%}.rtmedia-container .large-2,.rtmedia-activity-container .large-2,#buddypress div.rtmedia-activity-container .large-2{position:relative;width:16.66667%}.rtmedia-container .large-3,.rtmedia-activity-container .large-3,#buddypress div.rtmedia-activity-container .large-3{position:relative;width:25%}.rtmedia-container .large-4,.rtmedia-activity-container .large-4,#buddypress div.rtmedia-activity-container .large-4{position:relative;width:33.33333%}.rtmedia-container .large-5,.rtmedia-activity-container .large-5,#buddypress div.rtmedia-activity-container .large-5{position:relative;width:41.66667%}.rtmedia-container .large-6,.rtmedia-activity-container .large-6,#buddypress div.rtmedia-activity-container .large-6{position:relative;width:50%}.rtmedia-container .large-7,.rtmedia-activity-container .large-7,#buddypress div.rtmedia-activity-container .large-7{position:relative;width:58.33333%}.rtmedia-container .large-8,.rtmedia-activity-container .large-8,#buddypress div.rtmedia-activity-container .large-8{position:relative;width:66.66667%}.rtmedia-container .large-9,.rtmedia-activity-container .large-9,#buddypress div.rtmedia-activity-container .large-9{position:relative;width:75%}.rtmedia-container .large-10,.rtmedia-activity-container .large-10,#buddypress div.rtmedia-activity-container .large-10{position:relative;width:83.33333%}.rtmedia-container .large-11,.rtmedia-activity-container .large-11,#buddypress div.rtmedia-activity-container .large-11{position:relative;width:91.66667%}.rtmedia-container .large-12,.rtmedia-activity-container .large-12,#buddypress div.rtmedia-activity-container .large-12{position:relative;width:100%}.rtmedia-container .large-offset-0,.rtmedia-activity-container .large-offset-0,#buddypress div.rtmedia-activity-container .large-offset-0{position:relative;margin-left:0%}.rtmedia-container .large-offset-1,.rtmedia-activity-container .large-offset-1,#buddypress div.rtmedia-activity-container .large-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .large-offset-2,.rtmedia-activity-container .large-offset-2,#buddypress div.rtmedia-activity-container .large-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .large-offset-3,.rtmedia-activity-container .large-offset-3,#buddypress div.rtmedia-activity-container .large-offset-3{position:relative;margin-left:25%}.rtmedia-container .large-offset-4,.rtmedia-activity-container .large-offset-4,#buddypress div.rtmedia-activity-container .large-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .large-offset-5,.rtmedia-activity-container .large-offset-5,#buddypress div.rtmedia-activity-container .large-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .large-offset-6,.rtmedia-activity-container .large-offset-6,#buddypress div.rtmedia-activity-container .large-offset-6{position:relative;margin-left:50%}.rtmedia-container .large-offset-7,.rtmedia-activity-container .large-offset-7,#buddypress div.rtmedia-activity-container .large-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .large-offset-8,.rtmedia-activity-container .large-offset-8,#buddypress div.rtmedia-activity-container .large-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .large-offset-9,.rtmedia-activity-container .large-offset-9,#buddypress div.rtmedia-activity-container .large-offset-9{position:relative;margin-left:75%}.rtmedia-container .large-offset-10,.rtmedia-activity-container .large-offset-10,#buddypress div.rtmedia-activity-container .large-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.large-centered,.rtmedia-activity-container .column.large-centered,#buddypress div.rtmedia-activity-container .column.large-centered,.rtmedia-container .columns.large-centered,.rtmedia-activity-container .columns.large-centered,#buddypress div.rtmedia-activity-container .columns.large-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.large-uncentered,.rtmedia-activity-container .column.large-uncentered,#buddypress div.rtmedia-activity-container .column.large-uncentered,.rtmedia-container .columns.large-uncentered,.rtmedia-activity-container .columns.large-uncentered,#buddypress div.rtmedia-activity-container .columns.large-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.large-uncentered.opposite,.rtmedia-activity-container .column.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.large-uncentered.opposite,.rtmedia-container .columns.large-uncentered.opposite,.rtmedia-activity-container .columns.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.large-uncentered.opposite{float:right !important}}@media only screen and (min-width: 90.063em){.rtmedia-container .xlarge-push-1,.rtmedia-activity-container .xlarge-push-1,#buddypress div.rtmedia-activity-container .xlarge-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .xlarge-pull-1,.rtmedia-activity-container .xlarge-pull-1,#buddypress div.rtmedia-activity-container .xlarge-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .xlarge-push-2,.rtmedia-activity-container .xlarge-push-2,#buddypress div.rtmedia-activity-container .xlarge-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .xlarge-pull-2,.rtmedia-activity-container .xlarge-pull-2,#buddypress div.rtmedia-activity-container .xlarge-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .xlarge-push-3,.rtmedia-activity-container .xlarge-push-3,#buddypress div.rtmedia-activity-container .xlarge-push-3{position:relative;left:25%;right:auto}.rtmedia-container .xlarge-pull-3,.rtmedia-activity-container .xlarge-pull-3,#buddypress div.rtmedia-activity-container .xlarge-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .xlarge-push-4,.rtmedia-activity-container .xlarge-push-4,#buddypress div.rtmedia-activity-container .xlarge-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .xlarge-pull-4,.rtmedia-activity-container .xlarge-pull-4,#buddypress div.rtmedia-activity-container .xlarge-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .xlarge-push-5,.rtmedia-activity-container .xlarge-push-5,#buddypress div.rtmedia-activity-container .xlarge-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .xlarge-pull-5,.rtmedia-activity-container .xlarge-pull-5,#buddypress div.rtmedia-activity-container .xlarge-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .xlarge-push-6,.rtmedia-activity-container .xlarge-push-6,#buddypress div.rtmedia-activity-container .xlarge-push-6{position:relative;left:50%;right:auto}.rtmedia-container .xlarge-pull-6,.rtmedia-activity-container .xlarge-pull-6,#buddypress div.rtmedia-activity-container .xlarge-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .xlarge-push-7,.rtmedia-activity-container .xlarge-push-7,#buddypress div.rtmedia-activity-container .xlarge-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .xlarge-pull-7,.rtmedia-activity-container .xlarge-pull-7,#buddypress div.rtmedia-activity-container .xlarge-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .xlarge-push-8,.rtmedia-activity-container .xlarge-push-8,#buddypress div.rtmedia-activity-container .xlarge-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .xlarge-pull-8,.rtmedia-activity-container .xlarge-pull-8,#buddypress div.rtmedia-activity-container .xlarge-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .xlarge-push-9,.rtmedia-activity-container .xlarge-push-9,#buddypress div.rtmedia-activity-container .xlarge-push-9{position:relative;left:75%;right:auto}.rtmedia-container .xlarge-pull-9,.rtmedia-activity-container .xlarge-pull-9,#buddypress div.rtmedia-activity-container .xlarge-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .xlarge-push-10,.rtmedia-activity-container .xlarge-push-10,#buddypress div.rtmedia-activity-container .xlarge-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .xlarge-pull-10,.rtmedia-activity-container .xlarge-pull-10,#buddypress div.rtmedia-activity-container .xlarge-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .xlarge-push-11,.rtmedia-activity-container .xlarge-push-11,#buddypress div.rtmedia-activity-container .xlarge-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .xlarge-pull-11,.rtmedia-activity-container .xlarge-pull-11,#buddypress div.rtmedia-activity-container .xlarge-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .xlarge-1,.rtmedia-activity-container .xlarge-1,#buddypress div.rtmedia-activity-container .xlarge-1{position:relative;width:8.33333%}.rtmedia-container .xlarge-2,.rtmedia-activity-container .xlarge-2,#buddypress div.rtmedia-activity-container .xlarge-2{position:relative;width:16.66667%}.rtmedia-container .xlarge-3,.rtmedia-activity-container .xlarge-3,#buddypress div.rtmedia-activity-container .xlarge-3{position:relative;width:25%}.rtmedia-container .xlarge-4,.rtmedia-activity-container .xlarge-4,#buddypress div.rtmedia-activity-container .xlarge-4{position:relative;width:33.33333%}.rtmedia-container .xlarge-5,.rtmedia-activity-container .xlarge-5,#buddypress div.rtmedia-activity-container .xlarge-5{position:relative;width:41.66667%}.rtmedia-container .xlarge-6,.rtmedia-activity-container .xlarge-6,#buddypress div.rtmedia-activity-container .xlarge-6{position:relative;width:50%}.rtmedia-container .xlarge-7,.rtmedia-activity-container .xlarge-7,#buddypress div.rtmedia-activity-container .xlarge-7{position:relative;width:58.33333%}.rtmedia-container .xlarge-8,.rtmedia-activity-container .xlarge-8,#buddypress div.rtmedia-activity-container .xlarge-8{position:relative;width:66.66667%}.rtmedia-container .xlarge-9,.rtmedia-activity-container .xlarge-9,#buddypress div.rtmedia-activity-container .xlarge-9{position:relative;width:75%}.rtmedia-container .xlarge-10,.rtmedia-activity-container .xlarge-10,#buddypress div.rtmedia-activity-container .xlarge-10{position:relative;width:83.33333%}.rtmedia-container .xlarge-11,.rtmedia-activity-container .xlarge-11,#buddypress div.rtmedia-activity-container .xlarge-11{position:relative;width:91.66667%}.rtmedia-container .xlarge-12,.rtmedia-activity-container .xlarge-12,#buddypress div.rtmedia-activity-container .xlarge-12{position:relative;width:100%}.rtmedia-container .xlarge-offset-0,.rtmedia-activity-container .xlarge-offset-0,#buddypress div.rtmedia-activity-container .xlarge-offset-0{position:relative;margin-left:0%}.rtmedia-container .xlarge-offset-1,.rtmedia-activity-container .xlarge-offset-1,#buddypress div.rtmedia-activity-container .xlarge-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .xlarge-offset-2,.rtmedia-activity-container .xlarge-offset-2,#buddypress div.rtmedia-activity-container .xlarge-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .xlarge-offset-3,.rtmedia-activity-container .xlarge-offset-3,#buddypress div.rtmedia-activity-container .xlarge-offset-3{position:relative;margin-left:25%}.rtmedia-container .xlarge-offset-4,.rtmedia-activity-container .xlarge-offset-4,#buddypress div.rtmedia-activity-container .xlarge-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .xlarge-offset-5,.rtmedia-activity-container .xlarge-offset-5,#buddypress div.rtmedia-activity-container .xlarge-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .xlarge-offset-6,.rtmedia-activity-container .xlarge-offset-6,#buddypress div.rtmedia-activity-container .xlarge-offset-6{position:relative;margin-left:50%}.rtmedia-container .xlarge-offset-7,.rtmedia-activity-container .xlarge-offset-7,#buddypress div.rtmedia-activity-container .xlarge-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .xlarge-offset-8,.rtmedia-activity-container .xlarge-offset-8,#buddypress div.rtmedia-activity-container .xlarge-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .xlarge-offset-9,.rtmedia-activity-container .xlarge-offset-9,#buddypress div.rtmedia-activity-container .xlarge-offset-9{position:relative;margin-left:75%}.rtmedia-container .xlarge-offset-10,.rtmedia-activity-container .xlarge-offset-10,#buddypress div.rtmedia-activity-container .xlarge-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.xlarge-centered,.rtmedia-activity-container .column.xlarge-centered,#buddypress div.rtmedia-activity-container .column.xlarge-centered,.rtmedia-container .columns.xlarge-centered,.rtmedia-activity-container .columns.xlarge-centered,#buddypress div.rtmedia-activity-container .columns.xlarge-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.xlarge-uncentered,.rtmedia-activity-container .column.xlarge-uncentered,#buddypress div.rtmedia-activity-container .column.xlarge-uncentered,.rtmedia-container .columns.xlarge-uncentered,.rtmedia-activity-container .columns.xlarge-uncentered,#buddypress div.rtmedia-activity-container .columns.xlarge-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.xlarge-uncentered.opposite,.rtmedia-activity-container .column.xlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.xlarge-uncentered.opposite,.rtmedia-container .columns.xlarge-uncentered.opposite,.rtmedia-activity-container .columns.xlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.xlarge-uncentered.opposite{float:right !important}}@media only screen and (min-width: 120.063em){.rtmedia-container .xxlarge-push-1,.rtmedia-activity-container .xxlarge-push-1,#buddypress div.rtmedia-activity-container .xxlarge-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .xxlarge-pull-1,.rtmedia-activity-container .xxlarge-pull-1,#buddypress div.rtmedia-activity-container .xxlarge-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .xxlarge-push-2,.rtmedia-activity-container .xxlarge-push-2,#buddypress div.rtmedia-activity-container .xxlarge-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .xxlarge-pull-2,.rtmedia-activity-container .xxlarge-pull-2,#buddypress div.rtmedia-activity-container .xxlarge-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .xxlarge-push-3,.rtmedia-activity-container .xxlarge-push-3,#buddypress div.rtmedia-activity-container .xxlarge-push-3{position:relative;left:25%;right:auto}.rtmedia-container .xxlarge-pull-3,.rtmedia-activity-container .xxlarge-pull-3,#buddypress div.rtmedia-activity-container .xxlarge-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .xxlarge-push-4,.rtmedia-activity-container .xxlarge-push-4,#buddypress div.rtmedia-activity-container .xxlarge-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .xxlarge-pull-4,.rtmedia-activity-container .xxlarge-pull-4,#buddypress div.rtmedia-activity-container .xxlarge-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .xxlarge-push-5,.rtmedia-activity-container .xxlarge-push-5,#buddypress div.rtmedia-activity-container .xxlarge-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .xxlarge-pull-5,.rtmedia-activity-container .xxlarge-pull-5,#buddypress div.rtmedia-activity-container .xxlarge-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .xxlarge-push-6,.rtmedia-activity-container .xxlarge-push-6,#buddypress div.rtmedia-activity-container .xxlarge-push-6{position:relative;left:50%;right:auto}.rtmedia-container .xxlarge-pull-6,.rtmedia-activity-container .xxlarge-pull-6,#buddypress div.rtmedia-activity-container .xxlarge-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .xxlarge-push-7,.rtmedia-activity-container .xxlarge-push-7,#buddypress div.rtmedia-activity-container .xxlarge-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .xxlarge-pull-7,.rtmedia-activity-container .xxlarge-pull-7,#buddypress div.rtmedia-activity-container .xxlarge-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .xxlarge-push-8,.rtmedia-activity-container .xxlarge-push-8,#buddypress div.rtmedia-activity-container .xxlarge-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .xxlarge-pull-8,.rtmedia-activity-container .xxlarge-pull-8,#buddypress div.rtmedia-activity-container .xxlarge-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .xxlarge-push-9,.rtmedia-activity-container .xxlarge-push-9,#buddypress div.rtmedia-activity-container .xxlarge-push-9{position:relative;left:75%;right:auto}.rtmedia-container .xxlarge-pull-9,.rtmedia-activity-container .xxlarge-pull-9,#buddypress div.rtmedia-activity-container .xxlarge-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .xxlarge-push-10,.rtmedia-activity-container .xxlarge-push-10,#buddypress div.rtmedia-activity-container .xxlarge-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .xxlarge-pull-10,.rtmedia-activity-container .xxlarge-pull-10,#buddypress div.rtmedia-activity-container .xxlarge-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .xxlarge-push-11,.rtmedia-activity-container .xxlarge-push-11,#buddypress div.rtmedia-activity-container .xxlarge-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .xxlarge-pull-11,.rtmedia-activity-container .xxlarge-pull-11,#buddypress div.rtmedia-activity-container .xxlarge-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .xxlarge-1,.rtmedia-activity-container .xxlarge-1,#buddypress div.rtmedia-activity-container .xxlarge-1{position:relative;width:8.33333%}.rtmedia-container .xxlarge-2,.rtmedia-activity-container .xxlarge-2,#buddypress div.rtmedia-activity-container .xxlarge-2{position:relative;width:16.66667%}.rtmedia-container .xxlarge-3,.rtmedia-activity-container .xxlarge-3,#buddypress div.rtmedia-activity-container .xxlarge-3{position:relative;width:25%}.rtmedia-container .xxlarge-4,.rtmedia-activity-container .xxlarge-4,#buddypress div.rtmedia-activity-container .xxlarge-4{position:relative;width:33.33333%}.rtmedia-container .xxlarge-5,.rtmedia-activity-container .xxlarge-5,#buddypress div.rtmedia-activity-container .xxlarge-5{position:relative;width:41.66667%}.rtmedia-container .xxlarge-6,.rtmedia-activity-container .xxlarge-6,#buddypress div.rtmedia-activity-container .xxlarge-6{position:relative;width:50%}.rtmedia-container .xxlarge-7,.rtmedia-activity-container .xxlarge-7,#buddypress div.rtmedia-activity-container .xxlarge-7{position:relative;width:58.33333%}.rtmedia-container .xxlarge-8,.rtmedia-activity-container .xxlarge-8,#buddypress div.rtmedia-activity-container .xxlarge-8{position:relative;width:66.66667%}.rtmedia-container .xxlarge-9,.rtmedia-activity-container .xxlarge-9,#buddypress div.rtmedia-activity-container .xxlarge-9{position:relative;width:75%}.rtmedia-container .xxlarge-10,.rtmedia-activity-container .xxlarge-10,#buddypress div.rtmedia-activity-container .xxlarge-10{position:relative;width:83.33333%}.rtmedia-container .xxlarge-11,.rtmedia-activity-container .xxlarge-11,#buddypress div.rtmedia-activity-container .xxlarge-11{position:relative;width:91.66667%}.rtmedia-container .xxlarge-12,.rtmedia-activity-container .xxlarge-12,#buddypress div.rtmedia-activity-container .xxlarge-12{position:relative;width:100%}.rtmedia-container .xxlarge-offset-0,.rtmedia-activity-container .xxlarge-offset-0,#buddypress div.rtmedia-activity-container .xxlarge-offset-0{position:relative;margin-left:0%}.rtmedia-container .xxlarge-offset-1,.rtmedia-activity-container .xxlarge-offset-1,#buddypress div.rtmedia-activity-container .xxlarge-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .xxlarge-offset-2,.rtmedia-activity-container .xxlarge-offset-2,#buddypress div.rtmedia-activity-container .xxlarge-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .xxlarge-offset-3,.rtmedia-activity-container .xxlarge-offset-3,#buddypress div.rtmedia-activity-container .xxlarge-offset-3{position:relative;margin-left:25%}.rtmedia-container .xxlarge-offset-4,.rtmedia-activity-container .xxlarge-offset-4,#buddypress div.rtmedia-activity-container .xxlarge-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .xxlarge-offset-5,.rtmedia-activity-container .xxlarge-offset-5,#buddypress div.rtmedia-activity-container .xxlarge-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .xxlarge-offset-6,.rtmedia-activity-container .xxlarge-offset-6,#buddypress div.rtmedia-activity-container .xxlarge-offset-6{position:relative;margin-left:50%}.rtmedia-container .xxlarge-offset-7,.rtmedia-activity-container .xxlarge-offset-7,#buddypress div.rtmedia-activity-container .xxlarge-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .xxlarge-offset-8,.rtmedia-activity-container .xxlarge-offset-8,#buddypress div.rtmedia-activity-container .xxlarge-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .xxlarge-offset-9,.rtmedia-activity-container .xxlarge-offset-9,#buddypress div.rtmedia-activity-container .xxlarge-offset-9{position:relative;margin-left:75%}.rtmedia-container .xxlarge-offset-10,.rtmedia-activity-container .xxlarge-offset-10,#buddypress div.rtmedia-activity-container .xxlarge-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.xxlarge-centered,.rtmedia-activity-container .column.xxlarge-centered,#buddypress div.rtmedia-activity-container .column.xxlarge-centered,.rtmedia-container .columns.xxlarge-centered,.rtmedia-activity-container .columns.xxlarge-centered,#buddypress div.rtmedia-activity-container .columns.xxlarge-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.xxlarge-uncentered,.rtmedia-activity-container .column.xxlarge-uncentered,#buddypress div.rtmedia-activity-container .column.xxlarge-uncentered,.rtmedia-container .columns.xxlarge-uncentered,.rtmedia-activity-container .columns.xxlarge-uncentered,#buddypress div.rtmedia-activity-container .columns.xxlarge-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.xxlarge-uncentered.opposite,.rtmedia-activity-container .column.xxlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.xxlarge-uncentered.opposite,.rtmedia-container .columns.xxlarge-uncentered.opposite,.rtmedia-activity-container .columns.xxlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.xxlarge-uncentered.opposite{float:right !important}}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.show-for-small,.rtmedia-activity-container table.show-for-small,#buddypress div.rtmedia-activity-container table.show-for-small,.rtmedia-container table.show-for-small-only,.rtmedia-activity-container table.show-for-small-only,#buddypress div.rtmedia-activity-container table.show-for-small-only,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-large-down,.rtmedia-activity-container table.show-for-large-down,#buddypress div.rtmedia-activity-container table.show-for-large-down,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-up,.rtmedia-activity-container table.hide-for-medium-up,#buddypress div.rtmedia-activity-container table.hide-for-medium-up,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-large-only,.rtmedia-activity-container table.hide-for-large-only,#buddypress div.rtmedia-activity-container table.hide-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.show-for-small,.rtmedia-activity-container thead.show-for-small,#buddypress div.rtmedia-activity-container thead.show-for-small,.rtmedia-container thead.show-for-small-only,.rtmedia-activity-container thead.show-for-small-only,#buddypress div.rtmedia-activity-container thead.show-for-small-only,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-large-down,.rtmedia-activity-container thead.show-for-large-down,#buddypress div.rtmedia-activity-container thead.show-for-large-down,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-up,.rtmedia-activity-container thead.hide-for-medium-up,#buddypress div.rtmedia-activity-container thead.hide-for-medium-up,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-large-only,.rtmedia-activity-container thead.hide-for-large-only,#buddypress div.rtmedia-activity-container thead.hide-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.show-for-small,.rtmedia-activity-container tbody.show-for-small,#buddypress div.rtmedia-activity-container tbody.show-for-small,.rtmedia-container tbody.show-for-small-only,.rtmedia-activity-container tbody.show-for-small-only,#buddypress div.rtmedia-activity-container tbody.show-for-small-only,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-large-down,.rtmedia-activity-container tbody.show-for-large-down,#buddypress div.rtmedia-activity-container tbody.show-for-large-down,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-up,.rtmedia-activity-container tbody.hide-for-medium-up,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-up,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-large-only,.rtmedia-activity-container tbody.hide-for-large-only,#buddypress div.rtmedia-activity-container tbody.hide-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.show-for-small,.rtmedia-activity-container tr.show-for-small,#buddypress div.rtmedia-activity-container tr.show-for-small,.rtmedia-container tr.show-for-small-only,.rtmedia-activity-container tr.show-for-small-only,#buddypress div.rtmedia-activity-container tr.show-for-small-only,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-large-down,.rtmedia-activity-container tr.show-for-large-down,#buddypress div.rtmedia-activity-container tr.show-for-large-down,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-up,.rtmedia-activity-container tr.hide-for-medium-up,#buddypress div.rtmedia-activity-container tr.hide-for-medium-up,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-large-only,.rtmedia-activity-container tr.hide-for-large-only,#buddypress div.rtmedia-activity-container tr.hide-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.show-for-small,.rtmedia-activity-container td.show-for-small,#buddypress div.rtmedia-activity-container td.show-for-small,.rtmedia-container td.show-for-small-only,.rtmedia-activity-container td.show-for-small-only,#buddypress div.rtmedia-activity-container td.show-for-small-only,.rtmedia-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-container td.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-activity-container td.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-up,.rtmedia-activity-container td.hide-for-medium-up,#buddypress div.rtmedia-activity-container td.hide-for-medium-up,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-container td.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-activity-container td.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container th.show-for-small,.rtmedia-activity-container th.show-for-small,#buddypress div.rtmedia-activity-container th.show-for-small,.rtmedia-container th.show-for-small-only,.rtmedia-activity-container th.show-for-small-only,#buddypress div.rtmedia-activity-container th.show-for-small-only,.rtmedia-container th.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-container td.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-container th.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-container th.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-container th.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-activity-container th.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-up,.rtmedia-activity-container th.hide-for-medium-up,#buddypress div.rtmedia-activity-container th.hide-for-medium-up,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-container th.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-activity-container th.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container td.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-container th.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-container td.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-container td.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-container td.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-activity-container td.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container td.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-container td.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-activity-container td.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-container th.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-activity-container th.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-container th.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-activity-container th.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up{display:table-cell !important}@media only screen and (min-width: 40.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.show-for-medium,.rtmedia-activity-container table.show-for-medium,#buddypress div.rtmedia-activity-container table.show-for-medium,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-medium-only,.rtmedia-activity-container table.show-for-medium-only,#buddypress div.rtmedia-activity-container table.show-for-medium-only,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-large-only,.rtmedia-activity-container table.hide-for-large-only,#buddypress div.rtmedia-activity-container table.hide-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.show-for-medium,.rtmedia-activity-container thead.show-for-medium,#buddypress div.rtmedia-activity-container thead.show-for-medium,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-medium-only,.rtmedia-activity-container thead.show-for-medium-only,#buddypress div.rtmedia-activity-container thead.show-for-medium-only,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-large-only,.rtmedia-activity-container thead.hide-for-large-only,#buddypress div.rtmedia-activity-container thead.hide-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.show-for-medium,.rtmedia-activity-container tbody.show-for-medium,#buddypress div.rtmedia-activity-container tbody.show-for-medium,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-medium-only,.rtmedia-activity-container tbody.show-for-medium-only,#buddypress div.rtmedia-activity-container tbody.show-for-medium-only,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-large-only,.rtmedia-activity-container tbody.hide-for-large-only,#buddypress div.rtmedia-activity-container tbody.hide-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.show-for-medium,.rtmedia-activity-container tr.show-for-medium,#buddypress div.rtmedia-activity-container tr.show-for-medium,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-medium-only,.rtmedia-activity-container tr.show-for-medium-only,#buddypress div.rtmedia-activity-container tr.show-for-medium-only,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-large-only,.rtmedia-activity-container tr.hide-for-large-only,#buddypress div.rtmedia-activity-container tr.hide-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.show-for-medium,.rtmedia-activity-container td.show-for-medium,#buddypress div.rtmedia-activity-container td.show-for-medium,.rtmedia-container td.show-for-medium-down,.rtmedia-activity-container td.show-for-medium-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-medium-only,.rtmedia-activity-container td.show-for-medium-only,#buddypress div.rtmedia-activity-container td.show-for-medium-only,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-large-only,.rtmedia-activity-container td.hide-for-large-only,#buddypress div.rtmedia-activity-container td.hide-for-large-only,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge-only,.rtmedia-activity-container td.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.show-for-medium,.rtmedia-activity-container th.show-for-medium,#buddypress div.rtmedia-activity-container th.show-for-medium,.rtmedia-container th.show-for-medium-down,.rtmedia-activity-container th.show-for-medium-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-medium-only,.rtmedia-activity-container th.show-for-medium-only,#buddypress div.rtmedia-activity-container th.show-for-medium-only,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-large-only,.rtmedia-activity-container th.hide-for-large-only,#buddypress div.rtmedia-activity-container th.hide-for-large-only,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge,.rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge-only,.rtmedia-activity-container th.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 64.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large,.rtmedia-activity-container table.show-for-large,#buddypress div.rtmedia-activity-container table.show-for-large,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-large-only,.rtmedia-activity-container table.show-for-large-only,#buddypress div.rtmedia-activity-container table.show-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large,.rtmedia-activity-container thead.show-for-large,#buddypress div.rtmedia-activity-container thead.show-for-large,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-large-only,.rtmedia-activity-container thead.show-for-large-only,#buddypress div.rtmedia-activity-container thead.show-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large,.rtmedia-activity-container tbody.show-for-large,#buddypress div.rtmedia-activity-container tbody.show-for-large,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-large-only,.rtmedia-activity-container tbody.show-for-large-only,#buddypress div.rtmedia-activity-container tbody.show-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large,.rtmedia-activity-container tr.show-for-large,#buddypress div.rtmedia-activity-container tr.show-for-large,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-large-only,.rtmedia-activity-container tr.show-for-large-only,#buddypress div.rtmedia-activity-container tr.show-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large,.rtmedia-activity-container td.show-for-large,#buddypress div.rtmedia-activity-container td.show-for-large,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-large-only,.rtmedia-activity-container td.show-for-large-only,#buddypress div.rtmedia-activity-container td.show-for-large-only,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge-only,.rtmedia-activity-container td.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large,.rtmedia-activity-container th.show-for-large,#buddypress div.rtmedia-activity-container th.show-for-large,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-large-only,.rtmedia-activity-container th.show-for-large-only,#buddypress div.rtmedia-activity-container th.show-for-large-only,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge,.rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge-only,.rtmedia-activity-container th.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 90.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-xlarge,.rtmedia-activity-container table.show-for-xlarge,#buddypress div.rtmedia-activity-container table.show-for-xlarge,.rtmedia-container table.show-for-xlarge-up,.rtmedia-activity-container table.show-for-xlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xlarge-up,.rtmedia-container table.show-for-xlarge-only,.rtmedia-activity-container table.show-for-xlarge-only,#buddypress div.rtmedia-activity-container table.show-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-xlarge,.rtmedia-activity-container thead.show-for-xlarge,#buddypress div.rtmedia-activity-container thead.show-for-xlarge,.rtmedia-container thead.show-for-xlarge-up,.rtmedia-activity-container thead.show-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-up,.rtmedia-container thead.show-for-xlarge-only,.rtmedia-activity-container thead.show-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-xlarge,.rtmedia-activity-container tbody.show-for-xlarge,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge,.rtmedia-container tbody.show-for-xlarge-up,.rtmedia-activity-container tbody.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-up,.rtmedia-container tbody.show-for-xlarge-only,.rtmedia-activity-container tbody.show-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-xlarge,.rtmedia-activity-container tr.show-for-xlarge,#buddypress div.rtmedia-activity-container tr.show-for-xlarge,.rtmedia-container tr.show-for-xlarge-up,.rtmedia-activity-container tr.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-up,.rtmedia-container tr.show-for-xlarge-only,.rtmedia-activity-container tr.show-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-xlarge,.rtmedia-activity-container td.show-for-xlarge,#buddypress div.rtmedia-activity-container td.show-for-xlarge,.rtmedia-container td.show-for-xlarge-up,.rtmedia-activity-container td.show-for-xlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xlarge-up,.rtmedia-container td.show-for-xlarge-only,.rtmedia-activity-container td.show-for-xlarge-only,#buddypress div.rtmedia-activity-container td.show-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-xlarge,.rtmedia-activity-container th.show-for-xlarge,#buddypress div.rtmedia-activity-container th.show-for-xlarge,.rtmedia-container th.show-for-xlarge-up,.rtmedia-activity-container th.show-for-xlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xlarge-up,.rtmedia-container th.show-for-xlarge-only,.rtmedia-activity-container th.show-for-xlarge-only,#buddypress div.rtmedia-activity-container th.show-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 120.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-xlarge-up,.rtmedia-activity-container table.show-for-xlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xlarge-up,.rtmedia-container table.show-for-xxlarge-up,.rtmedia-activity-container table.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xxlarge-up,.rtmedia-container table.show-for-xxlarge-only,.rtmedia-activity-container table.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.show-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-xlarge-up,.rtmedia-activity-container thead.show-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-up,.rtmedia-container thead.show-for-xxlarge-up,.rtmedia-activity-container thead.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xxlarge-up,.rtmedia-container thead.show-for-xxlarge-only,.rtmedia-activity-container thead.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.show-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-xlarge-up,.rtmedia-activity-container tbody.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-up,.rtmedia-container tbody.show-for-xxlarge-up,.rtmedia-activity-container tbody.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xxlarge-up,.rtmedia-container tbody.show-for-xxlarge-only,.rtmedia-activity-container tbody.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.show-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-xlarge-up,.rtmedia-activity-container tr.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-up,.rtmedia-container tr.show-for-xxlarge-up,.rtmedia-activity-container tr.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xxlarge-up,.rtmedia-container tr.show-for-xxlarge-only,.rtmedia-activity-container tr.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.show-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-xlarge-up,.rtmedia-activity-container td.show-for-xlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xlarge-up,.rtmedia-container td.show-for-xxlarge-up,.rtmedia-activity-container td.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xxlarge-up,.rtmedia-container td.show-for-xxlarge-only,.rtmedia-activity-container td.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.show-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-xlarge-up,.rtmedia-activity-container th.show-for-xlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xlarge-up,.rtmedia-container th.show-for-xxlarge-up,.rtmedia-activity-container th.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xxlarge-up,.rtmedia-container th.show-for-xxlarge-only,.rtmedia-activity-container th.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.show-for-xxlarge-only{display:table-cell !important}}.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape,.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait{display:table}.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape,.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait{display:table-header-group !important}.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape,.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait{display:table-row-group !important}.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape,.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait{display:table-row !important}.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.show-for-landscape,.rtmedia-activity-container table.show-for-landscape,#buddypress div.rtmedia-activity-container table.show-for-landscape,.rtmedia-container table.hide-for-portrait,.rtmedia-activity-container table.hide-for-portrait,#buddypress div.rtmedia-activity-container table.hide-for-portrait{display:table}.rtmedia-container thead.show-for-landscape,.rtmedia-activity-container thead.show-for-landscape,#buddypress div.rtmedia-activity-container thead.show-for-landscape,.rtmedia-container thead.hide-for-portrait,.rtmedia-activity-container thead.hide-for-portrait,#buddypress div.rtmedia-activity-container thead.hide-for-portrait{display:table-header-group !important}.rtmedia-container tbody.show-for-landscape,.rtmedia-activity-container tbody.show-for-landscape,#buddypress div.rtmedia-activity-container tbody.show-for-landscape,.rtmedia-container tbody.hide-for-portrait,.rtmedia-activity-container tbody.hide-for-portrait,#buddypress div.rtmedia-activity-container tbody.hide-for-portrait{display:table-row-group !important}.rtmedia-container tr.show-for-landscape,.rtmedia-activity-container tr.show-for-landscape,#buddypress div.rtmedia-activity-container tr.show-for-landscape,.rtmedia-container tr.hide-for-portrait,.rtmedia-activity-container tr.hide-for-portrait,#buddypress div.rtmedia-activity-container tr.hide-for-portrait{display:table-row !important}.rtmedia-container td.show-for-landscape,.rtmedia-activity-container td.show-for-landscape,#buddypress div.rtmedia-activity-container td.show-for-landscape,.rtmedia-container td.hide-for-portrait,.rtmedia-activity-container td.hide-for-portrait,#buddypress div.rtmedia-activity-container td.hide-for-portrait,.rtmedia-container th.show-for-landscape,.rtmedia-activity-container th.show-for-landscape,#buddypress div.rtmedia-activity-container th.show-for-landscape,.rtmedia-container th.hide-for-portrait,.rtmedia-activity-container th.hide-for-portrait,#buddypress div.rtmedia-activity-container th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait,.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape{display:inherit !important}.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait,.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape{display:none !important}.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait,.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape{display:table}.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait,.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape{display:table-header-group !important}.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait,.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape{display:table-row-group !important}.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait,.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape{display:table-row !important}.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape{display:table-cell !important}}.rtmedia-container .show-for-touch,.rtmedia-activity-container .show-for-touch,#buddypress div.rtmedia-activity-container .show-for-touch{display:none !important}.rtmedia-container .hide-for-touch,.rtmedia-activity-container .hide-for-touch,#buddypress div.rtmedia-activity-container .hide-for-touch{display:inherit !important}.rtmedia-container .touch .show-for-touch,.rtmedia-activity-container .touch .show-for-touch,#buddypress div.rtmedia-activity-container .touch .show-for-touch{display:inherit !important}.rtmedia-container .touch .hide-for-touch,.rtmedia-activity-container .touch .hide-for-touch,#buddypress div.rtmedia-activity-container .touch .hide-for-touch{display:none !important}.rtmedia-container table.hide-for-touch,.rtmedia-activity-container table.hide-for-touch,#buddypress div.rtmedia-activity-container table.hide-for-touch{display:table}.rtmedia-container .touch table.show-for-touch,.rtmedia-activity-container .touch table.show-for-touch,#buddypress div.rtmedia-activity-container .touch table.show-for-touch{display:table}.rtmedia-container thead.hide-for-touch,.rtmedia-activity-container thead.hide-for-touch,#buddypress div.rtmedia-activity-container thead.hide-for-touch{display:table-header-group !important}.rtmedia-container .touch thead.show-for-touch,.rtmedia-activity-container .touch thead.show-for-touch,#buddypress div.rtmedia-activity-container .touch thead.show-for-touch{display:table-header-group !important}.rtmedia-container tbody.hide-for-touch,.rtmedia-activity-container tbody.hide-for-touch,#buddypress div.rtmedia-activity-container tbody.hide-for-touch{display:table-row-group !important}.rtmedia-container .touch tbody.show-for-touch,.rtmedia-activity-container .touch tbody.show-for-touch,#buddypress div.rtmedia-activity-container .touch tbody.show-for-touch{display:table-row-group !important}.rtmedia-container tr.hide-for-touch,.rtmedia-activity-container tr.hide-for-touch,#buddypress div.rtmedia-activity-container tr.hide-for-touch{display:table-row !important}.rtmedia-container .touch tr.show-for-touch,.rtmedia-activity-container .touch tr.show-for-touch,#buddypress div.rtmedia-activity-container .touch tr.show-for-touch{display:table-row !important}.rtmedia-container td.hide-for-touch,.rtmedia-activity-container td.hide-for-touch,#buddypress div.rtmedia-activity-container td.hide-for-touch{display:table-cell !important}.rtmedia-container .touch td.show-for-touch,.rtmedia-activity-container .touch td.show-for-touch,#buddypress div.rtmedia-activity-container .touch td.show-for-touch{display:table-cell !important}.rtmedia-container th.hide-for-touch,.rtmedia-activity-container th.hide-for-touch,#buddypress div.rtmedia-activity-container th.hide-for-touch{display:table-cell !important}.rtmedia-container .touch th.show-for-touch,.rtmedia-activity-container .touch th.show-for-touch,#buddypress div.rtmedia-activity-container .touch th.show-for-touch{display:table-cell !important}.rtmedia-container .flex-video,.rtmedia-activity-container .flex-video,#buddypress div.rtmedia-activity-container .flex-video{position:relative;padding-top:1.5625rem;padding-bottom:67.5%;height:0;margin-bottom:1rem;overflow:hidden}.rtmedia-container .flex-video.widescreen,.rtmedia-activity-container .flex-video.widescreen,#buddypress div.rtmedia-activity-container .flex-video.widescreen{padding-bottom:57.25%}.rtmedia-container .flex-video.vimeo,.rtmedia-activity-container .flex-video.vimeo,#buddypress div.rtmedia-activity-container .flex-video.vimeo{padding-top:0}.rtmedia-container .flex-video iframe,.rtmedia-activity-container .flex-video iframe,#buddypress div.rtmedia-activity-container .flex-video iframe,.rtmedia-container .flex-video object,.rtmedia-activity-container .flex-video object,#buddypress div.rtmedia-activity-container .flex-video object,.rtmedia-container .flex-video embed,.rtmedia-activity-container .flex-video embed,#buddypress div.rtmedia-activity-container .flex-video embed,.rtmedia-container .flex-video video,.rtmedia-activity-container .flex-video video,#buddypress div.rtmedia-activity-container .flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.rtmedia-container .tabs,.rtmedia-activity-container .tabs,#buddypress div.rtmedia-activity-container .tabs{*zoom:1;margin-bottom:0 !important}.rtmedia-container .tabs:before,.rtmedia-activity-container .tabs:before,#buddypress div.rtmedia-activity-container .tabs:before,.rtmedia-container .tabs:after,.rtmedia-activity-container .tabs:after,#buddypress div.rtmedia-activity-container .tabs:after{content:" ";display:table}.rtmedia-container .tabs:after,.rtmedia-activity-container .tabs:after,#buddypress div.rtmedia-activity-container .tabs:after{clear:both}.rtmedia-container .tabs dd,.rtmedia-activity-container .tabs dd,#buddypress div.rtmedia-activity-container .tabs dd{position:relative;margin-bottom:0 !important;top:1px;float:left}.rtmedia-container .tabs dd>a,.rtmedia-activity-container .tabs dd>a,#buddypress div.rtmedia-activity-container .tabs dd>a{display:block;background:#efefef;color:#222;padding-top:1rem;padding-right:2rem;padding-bottom:1.0625rem;padding-left:2rem;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-size:1rem}.rtmedia-container .tabs dd>a:hover,.rtmedia-activity-container .tabs dd>a:hover,#buddypress div.rtmedia-activity-container .tabs dd>a:hover{background:#e2e2e2}.rtmedia-container .tabs dd.active a,.rtmedia-activity-container .tabs dd.active a,#buddypress div.rtmedia-activity-container .tabs dd.active a{background:#fff}.rtmedia-container .tabs.radius dd:first-child a,.rtmedia-activity-container .tabs.radius dd:first-child a,#buddypress div.rtmedia-activity-container .tabs.radius dd:first-child a{-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.rtmedia-container .tabs.radius dd:last-child a,.rtmedia-activity-container .tabs.radius dd:last-child a,#buddypress div.rtmedia-activity-container .tabs.radius dd:last-child a{-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.rtmedia-container .tabs.vertical dd,.rtmedia-activity-container .tabs.vertical dd,#buddypress div.rtmedia-activity-container .tabs.vertical dd{position:inherit;float:none;display:block;top:auto}.rtmedia-container .tabs-content,.rtmedia-activity-container .tabs-content,#buddypress div.rtmedia-activity-container .tabs-content{*zoom:1;margin-bottom:1.5rem}.rtmedia-container .tabs-content:before,.rtmedia-activity-container .tabs-content:before,#buddypress div.rtmedia-activity-container .tabs-content:before,.rtmedia-container .tabs-content:after,.rtmedia-activity-container .tabs-content:after,#buddypress div.rtmedia-activity-container .tabs-content:after{content:" ";display:table}.rtmedia-container .tabs-content:after,.rtmedia-activity-container .tabs-content:after,#buddypress div.rtmedia-activity-container .tabs-content:after{clear:both}.rtmedia-container .tabs-content>.content,.rtmedia-activity-container .tabs-content>.content,#buddypress div.rtmedia-activity-container .tabs-content>.content{display:none;float:left;padding:0.9375rem 0}.rtmedia-container .tabs-content>.content.active,.rtmedia-activity-container .tabs-content>.content.active,#buddypress div.rtmedia-activity-container .tabs-content>.content.active{display:block}.rtmedia-container .tabs-content>.content.contained,.rtmedia-activity-container .tabs-content>.content.contained,#buddypress div.rtmedia-activity-container .tabs-content>.content.contained{padding:0.9375rem}.rtmedia-container .tabs-content.vertical,.rtmedia-activity-container .tabs-content.vertical,#buddypress div.rtmedia-activity-container .tabs-content.vertical{display:block}.rtmedia-container .tabs-content.vertical>.content,.rtmedia-activity-container .tabs-content.vertical>.content,#buddypress div.rtmedia-activity-container .tabs-content.vertical>.content{padding:0 0.9375rem}@media only screen and (min-width: 40.063em){.rtmedia-container .tabs.vertical,.rtmedia-activity-container .tabs.vertical,#buddypress div.rtmedia-activity-container .tabs.vertical{width:20%;float:left;margin-bottom:1.25rem}.rtmedia-container .tabs-content.vertical,.rtmedia-activity-container .tabs-content.vertical,#buddypress div.rtmedia-activity-container .tabs-content.vertical{width:80%;float:left;margin-left:-1px}}.rtmedia-container .rtmedia-editor-main dl.tabs dd>a,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a{font-size:14px;text-decoration:none;padding:5px 15px;background:#f1f1f1}.rtmedia-container .rtmedia-editor-main dl.tabs dd>a:hover,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a:hover,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a:hover{background:#dcdcdc}.rtmedia-container .rtmedia-editor-main dl.tabs dd.active>a,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd.active>a,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd.active>a{background:#50A1D7;color:#fff}.rtmedia-container .rtmedia-editor-main .tabs-content,.rtmedia-activity-container .rtmedia-editor-main .tabs-content,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .tabs-content{margin-bottom:5px}.rtmedia-container .rtmedia-editor-main .tabs-content .content,.rtmedia-activity-container .rtmedia-editor-main .tabs-content .content,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .tabs-content .content{float:none;padding:10px}.rtmedia-container .rtmedia-editor-main .rtmedia-title-editor,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-title-editor,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-title-editor{display:block;width:100%}.rtmedia-container .rtmedia-editor-main .rtmedia-edit-change-album,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-change-album,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-change-album{margin-top:15px}.rtmedia-container .rtmedia-editor-main .rtmedia-edit-title label,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-title label,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-title label{display:block}.rtmedia-container .primary,.rtmedia-activity-container .primary,#buddypress div.rtmedia-activity-container .primary{color:#3475BA}.rtmedia-container .secondary,.rtmedia-activity-container .secondary,#buddypress div.rtmedia-activity-container .secondary{color:#82909D}.rtmedia-container #buddypress li,.rtmedia-activity-container #buddypress li{list-style:none}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{max-width:95%}.rtmedia-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title,#buddypress div.rtmedia-activity-container .rtmedia-item-title{text-align:center}.rtmedia-container .rtmedia-item-title h4,.rtmedia-activity-container .rtmedia-item-title h4,#buddypress div.rtmedia-activity-container .rtmedia-item-title h4{text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden;font-size:1.1em;text-align:center}.rtmedia-container .rtmedia-success,.rtmedia-activity-container .rtmedia-success,#buddypress div.rtmedia-activity-container .rtmedia-success{display:block;padding:5px;margin-top:15px;border:1px solid #457A1A;background-color:#5DA423;font-weight:bold}.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2{font-size:1.4em;font-weight:bold;line-height:2.4em}.rtmedia-container .drag-drop,.rtmedia-activity-container .drag-drop,#buddypress div.rtmedia-activity-container .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;color:#AAAAAA;padding:25px 0}.rtmedia-container .drag-drop.dragover,.rtmedia-activity-container .drag-drop.dragover,#buddypress div.rtmedia-activity-container .drag-drop.dragover{border-color:#83b4d8}.rtmedia-container .drag-drop .drag-drop-info,.rtmedia-activity-container .drag-drop .drag-drop-info,#buddypress div.rtmedia-activity-container .drag-drop .drag-drop-info{font-size:20px;line-height:24px}.rtmedia-container .drag-drop .rtm-album-privacy span,.rtmedia-activity-container .drag-drop .rtm-album-privacy span,#buddypress div.rtmedia-activity-container .drag-drop .rtm-album-privacy span{margin:0 30px 20px 30px;display:inline-block}.rtmedia-container .drag-drop .rtm-select-files span,.rtmedia-activity-container .drag-drop .rtm-select-files span,#buddypress div.rtmedia-activity-container .drag-drop .rtm-select-files span{vertical-align:middle}.rtmedia-container .drag-drop .rtm-seperator,.rtmedia-activity-container .drag-drop .rtm-seperator,#buddypress div.rtmedia-activity-container .drag-drop .rtm-seperator{margin:0px 20px}.rtmedia-container .drag-drop .start-media-upload,.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload{display:none;margin-top:20px}.rtmedia-container .drag-drop .rtm-file-size-limit,.rtmedia-activity-container .drag-drop .rtm-file-size-limit,#buddypress div.rtmedia-activity-container .drag-drop .rtm-file-size-limit{vertical-align:middle;font-size:16px;line-height:24px}.rtmedia-container .rtmedia-action-update,.rtmedia-activity-container .rtmedia-action-update,#buddypress div.rtmedia-activity-container .rtmedia-action-update{float:left;margin-top:12px;margin-right:10px}.rtmedia-container .rtmedia-list,.rtmedia-activity-container .rtmedia-list,#buddypress div.rtmedia-activity-container .rtmedia-list{list-style:none}.rtmedia-container .rtmedia-list .rtmedia-list-item,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item{word-wrap:break-word;margin:10px;float:left;list-style:none;position:relative}.rtmedia-container .rtmedia-list .rtmedia-list-item a,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a{text-decoration:none}.rtmedia-container .rtmedia-list .rtmedia-list-item a h4,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4{line-height:1.4em;font-size:1.2em;padding-top:10px}.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector{position:absolute}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video{width:100%}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail{margin:8px 4px 0px 4px;height:0px}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time{height:24px}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-photo,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-photo,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-photo{width:100%}.rtmedia-container .rtmedia-media img,.rtmedia-activity-container .rtmedia-media img,#buddypress div.rtmedia-activity-container .rtmedia-media img{max-width:100%}.rtmedia-container .rtmedia-item-thumbnail,.rtmedia-activity-container .rtmedia-item-thumbnail,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail{text-align:center}.rtmedia-container .rtmedia-item-thumbnail img,.rtmedia-activity-container .rtmedia-item-thumbnail img,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail img{vertical-align:middle}.rtmedia-container .rtmedia_next_prev,.rtmedia-activity-container .rtmedia_next_prev,#buddypress div.rtmedia-activity-container .rtmedia_next_prev{clear:both}.rtmedia-container .rtmedia_next_prev a,.rtmedia-activity-container .rtmedia_next_prev a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev a{display:block;clear:both;background-color:#E9E9E9;padding:10px;text-align:center;text-decoration:none;color:#000;margin:15px}.rtmedia-container .rtmedia_next_prev .pagination,.rtmedia-activity-container .rtmedia_next_prev .pagination,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination{clear:both;padding:0;position:relative;font-size:11px;line-height:13px}.rtmedia-container .rtmedia_next_prev .pagination span,.rtmedia-activity-container .rtmedia_next_prev .pagination span,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination span,.rtmedia-container .rtmedia_next_prev .pagination a,.rtmedia-activity-container .rtmedia_next_prev .pagination a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination a{display:inline;float:left;margin:2px 2px 2px 0;padding:6px 9px 5px 9px;text-decoration:none;width:auto;color:#fff;background:#555;float:none;font-size:13px;line-height:30px}.rtmedia-container .rtmedia_next_prev .pagination span:hover,.rtmedia-activity-container .rtmedia_next_prev .pagination span:hover,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination span:hover,.rtmedia-container .rtmedia_next_prev .pagination a:hover,.rtmedia-activity-container .rtmedia_next_prev .pagination a:hover,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination a:hover{color:#fff;background:#bc360a}.rtmedia-container .rtmedia_next_prev .pagination .current,.rtmedia-activity-container .rtmedia_next_prev .pagination .current,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .current{padding:6px 9px 5px 9px;background:#bc360a;color:#fff}.rtmedia-container .rtmedia_next_prev .pagination .rtmedia-page-no,.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no{display:inline;float:left;font-size:13px;color:#888}.rtmedia-container .rtmedia_next_prev .pagination .rtmedia-page-no input,.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no input,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no input{padding:3px;max-width:50px}.rtmedia-container .rtmedia-item-comments-container,.rtmedia-activity-container .rtmedia-item-comments-container,#buddypress div.rtmedia-activity-container .rtmedia-item-comments-container{margin:3% 3%}.rtmedia-container #rtmedia_comment_ul,.rtmedia-activity-container #rtmedia_comment_ul,#buddypress div.rtmedia-activity-container #rtmedia_comment_ul{margin-left:0;margin-bottom:10px}.rtmedia-container .rtmedia-bp-header,.rtmedia-activity-container .rtmedia-bp-header,#buddypress div.rtmedia-activity-container .rtmedia-bp-header{width:460px;margin:auto}.rtmedia-container #div-attache-rtmedia,.rtmedia-activity-container #div-attache-rtmedia,#buddypress div.rtmedia-activity-container #div-attache-rtmedia{display:none}.rtmedia-container #rtMedia-update-queue-list p span,.rtmedia-activity-container #rtMedia-update-queue-list p span{margin-right:20px}.rtmedia-container .rtmedia-move-container,.rtmedia-activity-container .rtmedia-move-container,#buddypress div.rtmedia-activity-container .rtmedia-move-container{display:none;padding:10px;border:1px dashed #999}.rtmedia-container #rtmedia-add-media-button-post-update,.rtmedia-activity-container #rtmedia-add-media-button-post-update,#buddypress div.rtmedia-activity-container #rtmedia-add-media-button-post-update{float:left;margin-top:10px;margin-right:20px}.rtmedia-container #whats-new-post-in-box,.rtmedia-activity-container #whats-new-post-in-box,#buddypress div.rtmedia-activity-container #whats-new-post-in-box{float:left}.rtmedia-container .rtmedia-activity-text,.rtmedia-activity-container .rtmedia-activity-text,#buddypress div.rtmedia-activity-container .rtmedia-activity-text{display:block;padding-bottom:10px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:auto}.rtmedia-container.rtmedia-single-container .row,.rtmedia-single-container.rtmedia-activity-container .row,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row{background-color:#FFF}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container{padding-top:10px;padding-bottom:10px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button{margin:-50px 0 0 -50px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media-title,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media-title{margin:0 0 5px 0;display:block;font-weight:bold;letter-spacing:1px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta{padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.userprofile,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile{float:left;padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username{padding:0 10px;line-height:16px;font-weight:bold}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a{text-decoration:none}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username a:hover,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a:hover,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a:hover{text-decoration:underline}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtm-time-privacy,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy{font-size:12px;line-height:24px;margin-bottom:7px;color:#808080}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtm-time-privacy i,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy i,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy i{margin-left:4px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtmedia-actions-before-description,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description{margin-top:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div{float:left;line-height:20px;display:inline-block}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta button,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button{color:#5E5E5E;background-color:#EBEBEB;background-repeat:repeat-x;background-image:-moz-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-ms-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-webkit-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-o-linear-gradient(top, #f9f9f9, #ebebeb);background-image:linear-gradient(to bottom, #f9f9f9,#ebebeb)}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a{float:left;margin:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li{display:inline-block;float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like{display:none}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a{display:inline-block;float:left}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>form,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form{float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count{background:#EEE;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;border:1px solid #CCC;color:#999;display:inline;font-size:70%;margin-left:2px;margin-right:2px;padding:3px 6px;text-align:center;vertical-align:middle}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-media-description,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-media-description,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-media-description{line-height:22px;margin:10px 0}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info{width:100%}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info:before,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before{top:13px;left:20px}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtmedia-like-info,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info{background-color:#EDEFF4;font-size:12px;line-height:16px;padding:3px 5px;position:relative;margin-bottom:2px}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtmedia-like-info i,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info i,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info i{margin-right:4px}.rtmedia-container #wp-description-editor-tools a.wp-switch-editor,.rtmedia-activity-container #wp-description-editor-tools a.wp-switch-editor{margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border:1px solid;border-color:#DFDFDF #DFDFDF #CCC;font:13px/18px Arial,Helvetica,sans-serif normal;height:auto}.rtmedia-container #description_toolbargroup .mceToolbar td,.rtmedia-activity-container #description_toolbargroup .mceToolbar td{padding:0px}.rtmedia-container #wp-description-editor-container,.rtmedia-activity-container #wp-description-editor-container,#buddypress div.rtmedia-activity-container #wp-description-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#CCC #CCC #DFDFDF}.rtmedia-container .rtmedia-change-cover-arts p,.rtmedia-activity-container .rtmedia-change-cover-arts p,#buddypress div.rtmedia-activity-container .rtmedia-change-cover-arts p{padding:5px 0}.rtmedia-container .rtm-media-loading,.rtmedia-activity-container .rtm-media-loading,#buddypress div.rtmedia-activity-container .rtm-media-loading{text-align:center;padding:20px 0}.rt-clear:after{display:block;height:0;line-height:0;clear:both;content:'.';visibility:hidden}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments{color:#6D84B4;line-height:18px;margin-bottom:5px}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span{display:inline-block;margin-right:5px}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons{padding:0;color:#21759B;font-size:12px;line-height:14px;text-decoration:none}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a:hover,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button:hover,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons:hover{text-decoration:underline}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a.rtmedia-like i,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-like i,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons.rtmedia-like i{display:none}#buddypress button.rtm-alert-btn{background-color:#f04124;border-color:#cf280e;color:white}#buddypress div.rtmedia-activity-container ul.rtmedia-list li{float:left;padding:10px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li .rtmedia-item-thumbnail{overflow:hidden;margin:0 auto}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video{float:none}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail{margin:0 auto;overflow:hidden}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-overlay-button{margin:-50px 0 0 -50px}#buddypress .mejs-controls button,.rtmedia-container .mejs-controls button,.rtmedia-activity-container .mejs-controls button,#buddypress div.rtmedia-activity-container .mejs-controls button{padding:4px 8px;border:none;background:transparent url("../../../lib/media-element/controls.png") no-repeat}#buddypress .mejs-controls .mejs-play button,.rtmedia-container .mejs-controls .mejs-play button,.rtmedia-activity-container .mejs-controls .mejs-play button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-play button{background-position:0 0}#buddypress .mejs-controls .mejs-pause button,.rtmedia-container .mejs-controls .mejs-pause button,.rtmedia-activity-container .mejs-controls .mejs-pause button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-pause button{background-position:0 -16px}#buddypress .mejs-controls .mejs-unmute button,.rtmedia-container .mejs-controls .mejs-unmute button,.rtmedia-activity-container .mejs-controls .mejs-unmute button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-unmute button{background-position:-16px 0}#buddypress .mejs-controls .mejs-mute button,.rtmedia-container .mejs-controls .mejs-mute button,.rtmedia-activity-container .mejs-controls .mejs-mute button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress .mejs-controls .mejs-fullscreen-button button,.rtmedia-container .mejs-controls .mejs-fullscreen-button button,.rtmedia-activity-container .mejs-controls .mejs-fullscreen-button button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#buddypress .mejs-controls .mejs-unfullscreen button,.rtmedia-container .mejs-controls .mejs-unfullscreen button,.rtmedia-activity-container .mejs-controls .mejs-unfullscreen button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mfp-content #rtmedia-single-media-container .rtmedia-media{text-align:center;background-color:#333;overflow:hidden}.mfp-content #rtmedia-single-media-container .rtmedia-media img{max-height:95%}#rtmedia-action-update{float:left;padding-right:10px}.mfp-ready,.mfp-bg{z-index:9999}div.mfp-bg{background-color:#222222;opacity:0.7}.bp_media_content video{background-color:black}.rtmedia-success{display:block;padding:5px 10px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#2ECC71;color:white}.rtmedia-error{color:white;display:block;padding:10px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#E74C3C}.rtmp-uploaded-file{width:100%}.close{cursor:pointer;color:red}button.mfp-arrow,button.mfp-arrow:active{margin-top:-30px}button.rtp-lb-close{top:0;right:0}#object-nav li,#group-admins li,.item-list-tabs li{list-style:none}.mejs-video .mejs-controls{position:absolute}.mfp-content #rtmedia-single-media-container .wp-audio-shortcode{height:0px !important}.rtmedia-media-edit .rtmedia-single-edit-title-container,#buddypress .rtmedia-media-edit .rtmedia-single-edit-title-container{margin-bottom:20px}.rtmedia-media-edit .rtmedia-single-edit-title-container .rtmedia-title,#buddypress .rtmedia-media-edit .rtmedia-single-edit-title-container .rtmedia-title{margin:0}.rtmedia-media-edit .rtmedia-edit-title,#buddypress .rtmedia-media-edit .rtmedia-edit-title{margin-bottom:15px}.rtmedia-media-edit .rtmedia-edit-privacy,#buddypress .rtmedia-media-edit .rtmedia-edit-privacy{margin-bottom:10px}.rtmedia-media-edit .rtmedia-editor-description>label,#buddypress .rtmedia-media-edit .rtmedia-editor-description>label{display:block;line-height:24px}.rtmedia-media-edit .rtmedia-editor-description .rtmedia-desc-textarea,#buddypress .rtmedia-media-edit .rtmedia-editor-description .rtmedia-desc-textarea{width:100%;display:inline-block;padding:5px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-menu,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-menu{margin-bottom:15px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-crop-wrap,.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-group>p,.rtmedia-media-edit .rtmedia-image-editor-cotnainer .wp_attachment_image .thumbnail,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-crop-wrap,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-group>p,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .wp_attachment_image .thumbnail{margin-bottom:10px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .hidden,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .hidden{display:none}.rtmedia-media-edit .rtmedia-image-editor-cotnainer hr,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer hr{margin:15px 0 25px 0}.rtmedia-media-edit #rtmedia-image-editor-cotnainer .imgedit-wrap td,#buddypress .rtmedia-media-edit #rtmedia-image-editor-cotnainer .imgedit-wrap td{vertical-align:top}.rtmedia-container #rtm-media-options,.rtmedia-activity-container #rtm-media-options,#buddypress div.rtmedia-activity-container #rtm-media-options,.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{line-height:30px}.rtmedia-container #rtm-media-options [class^="icon-"],.rtmedia-activity-container #rtm-media-options [class^="icon-"],.rtmedia-container #rtm-media-options [class*=" icon-"],.rtmedia-activity-container #rtm-media-options [class*=" icon-"],.rtmedia-container [class^="icon-"],.rtmedia-activity-container [class^="icon-"],#buddypress div.rtmedia-activity-container [class^="icon-"],.rtmedia-container [class*=" icon-"],.rtmedia-activity-container [class*=" icon-"],#buddypress div.rtmedia-activity-container [class*=" icon-"]{font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;cursor:pointer;padding:0;border:none}.rtmedia-container #rtm-media-options [class^="icon-"].icon-2x,.rtmedia-activity-container #rtm-media-options [class^="icon-"].icon-2x,.rtmedia-container #rtm-media-options [class*=" icon-"].icon-2x,.rtmedia-activity-container #rtm-media-options [class*=" icon-"].icon-2x,.rtmedia-container [class^="icon-"].icon-2x,.rtmedia-activity-container [class^="icon-"].icon-2x,#buddypress div.rtmedia-activity-container [class^="icon-"].icon-2x,.rtmedia-container [class*=" icon-"].icon-2x,.rtmedia-activity-container [class*=" icon-"].icon-2x,#buddypress div.rtmedia-activity-container [class*=" icon-"].icon-2x{font-size:1.6em}.rtmedia-container #rtm-media-options [class^="icon-"].icon-3x,.rtmedia-activity-container #rtm-media-options [class^="icon-"].icon-3x,.rtmedia-container #rtm-media-options [class*=" icon-"].icon-3x,.rtmedia-activity-container #rtm-media-options [class*=" icon-"].icon-3x,.rtmedia-container [class^="icon-"].icon-3x,.rtmedia-activity-container [class^="icon-"].icon-3x,#buddypress div.rtmedia-activity-container [class^="icon-"].icon-3x,.rtmedia-container [class*=" icon-"].icon-3x,.rtmedia-activity-container [class*=" icon-"].icon-3x,#buddypress div.rtmedia-activity-container [class*=" icon-"].icon-3x{font-size:3em}.rtmedia-container #rtm-media-options [class^="icon-"]:visited,.rtmedia-activity-container #rtm-media-options [class^="icon-"]:visited,.rtmedia-container #rtm-media-options [class*=" icon-"]:visited,.rtmedia-activity-container #rtm-media-options [class*=" icon-"]:visited,.rtmedia-container [class^="icon-"]:visited,.rtmedia-activity-container [class^="icon-"]:visited,#buddypress div.rtmedia-activity-container [class^="icon-"]:visited,.rtmedia-container [class*=" icon-"]:visited,.rtmedia-activity-container [class*=" icon-"]:visited,#buddypress div.rtmedia-activity-container [class*=" icon-"]:visited{color:#444444}.rtmedia-container #rtm-media-options [class^="icon-"]:hover,.rtmedia-activity-container #rtm-media-options [class^="icon-"]:hover,.rtmedia-container #rtm-media-options [class*=" icon-"]:hover,.rtmedia-activity-container #rtm-media-options [class*=" icon-"]:hover,.rtmedia-container [class^="icon-"]:hover,.rtmedia-activity-container [class^="icon-"]:hover,#buddypress div.rtmedia-activity-container [class^="icon-"]:hover,.rtmedia-container [class*=" icon-"]:hover,.rtmedia-activity-container [class*=" icon-"]:hover,#buddypress div.rtmedia-activity-container [class*=" icon-"]:hover{background:none}.rtmedia-container #rtm-media-options .icon-remove,.rtmedia-activity-container #rtm-media-options .icon-remove,.rtmedia-container .icon-remove,.rtmedia-activity-container .icon-remove,#buddypress div.rtmedia-activity-container .icon-remove{color:red}#rtm-media-options{text-align:right}#rtm-media-options [class^="icon-"],#rtm-media-options [class*=" icon-"]{margin-left:10px;color:#444444}#rtm-media-options .rtmedia-upload-media-link,#rtm-media-options i,#rtm-media-options a,#rtm-media-options button,#rtm-media-options span{font-size:16px;cursor:pointer;color:#444444;text-decoration:none}#rtm-media-options .primary,#rtm-media-options .primary i{color:#3475BA}#rtm-media-options .rtmedia-delete-album{margin-left:0}.rtmedia-inline{display:inline}.rtmedia-container .rtMedia-queue-list,.rtmedia-activity-container .rtMedia-queue-list,#buddypress div.rtmedia-activity-container .rtMedia-queue-list{margin-bottom:10px;line-height:20px;width:100%}.rtmedia-container .rtMedia-queue-list tr td,.rtmedia-activity-container .rtMedia-queue-list tr td,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr td,.rtmedia-container .rtMedia-queue-list tr th,.rtmedia-activity-container .rtMedia-queue-list tr th,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr th{padding:3px 8px}.rtmedia-container .rtMedia-queue-list tr,.rtmedia-activity-container .rtMedia-queue-list tr,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr{color:#333}.rtmedia-container .rtMedia-queue-list tr>td.close,.rtmedia-activity-container .rtMedia-queue-list tr>td.close,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr>td.close{text-align:right}.rtmedia-container .rtMedia-queue-list tr>td.plupload_file_size,.rtmedia-activity-container .rtMedia-queue-list tr>td.plupload_file_size,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr>td.plupload_file_size{text-transform:uppercase}.rtmedia-container .rtMedia-queue-list tr.upload-waiting,.rtmedia-activity-container .rtMedia-queue-list tr.upload-waiting,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-waiting{background-color:#FFFFCC;border-bottom:1px solid #ffeca0}.rtmedia-container .rtMedia-queue-list tr.upload-error,.rtmedia-activity-container .rtMedia-queue-list tr.upload-error,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-error{background-color:#ffe5e5;border-bottom:1px solid #ffcccc}.rtmedia-container .rtMedia-queue-list tr.upload-success,.rtmedia-activity-container .rtMedia-queue-list tr.upload-success,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-success,.rtmedia-container .rtMedia-queue-list tr.upload-progress,.rtmedia-activity-container .rtMedia-queue-list tr.upload-progress,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-progress{background-color:#C2FAC1;border-bottom:1px solid #8EE888}.rtmedia-container .rtMedia-queue-list .plupload_media_edit a,.rtmedia-activity-container .rtMedia-queue-list .plupload_media_edit a,#buddypress div.rtmedia-activity-container .rtMedia-queue-list .plupload_media_edit a{text-decoration:none;color:#181818}#rtm-drop-files-title{font-size:24px;text-align:center;margin:-80px 0 40px 0;z-index:0;display:none}.rtm-drag-drop-active{border:4px dashed green !important;opacity:0.5;height:100%;display:block;z-index:9999}.drag-drop p{margin:10px 0}#drag-drop-title{position:absolute;margin-top:-30px;z-index:0}#rtm-upload-start-notice{display:none}#rtm-upload-start-notice>span{color:red;font-size:14px;line-height:20px}#rtm-media-gallery-uploader{display:none;margin-bottom:20px}#rtm-gallery-title-container{margin:0 0 15px 0}#rtm-gallery-title-container .rtm-gallery-title{display:inline-block;margin:0;overflow:hidden;vertical-align:bottom;padding-left:0;padding-right:0}#rtm-gallery-title-container #rtm-media-options{padding:5px 0;display:inline-block}#rtm-gallery-title-container #rtm-media-options .click-nav{float:none}#rtm-gallery-title-container #rtm-media-options .click-nav .clicker,#rtm-gallery-title-container #rtm-media-options .click-nav .clicker>i{font-size:16px}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input{border:none;padding:2px 5px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background:none;color:#fff;display:block;width:100%;text-align:left;font-size:13px;line-height:24px}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input:hover{background-color:#fff;color:#37454D}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input:hover i{color:#37454D}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li i{font-size:13px;color:#fff}.rtmedia-container ul#rtmedia_comment_ul li,.rtmedia-activity-container ul#rtmedia_comment_ul li{list-style:none;background:#EDEFF4;margin:0 0 2px 0;padding:5px;width:100%;position:relative;word-wrap:break;line-height:20px}.rtmedia-container ul#rtmedia_comment_ul li.rtmedia-no-comments,.rtmedia-activity-container ul#rtmedia_comment_ul li.rtmedia-no-comments{padding:5px;font-size:12px}.rtmedia-container ul#rtmedia_comment_ul li:hover .rtmedia-delete-comment,.rtmedia-activity-container ul#rtmedia_comment_ul li:hover .rtmedia-delete-comment{display:block}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-details,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-details{overflow:hidden;margin:0;padding:0}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic{float:left;margin:0 10px 0 0;padding:2px 0 0 2px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic img,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic img{height:35px !important;width:35px !important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author{line-height:18px;font-size:13px;margin-right:5px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author a,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author a{color:#3B5998;font-weight:bold;text-decoration:none;line-height:18px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author a:hover,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author a:hover{text-decoration:underline}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-content,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-content{line-height:16px;font-size:13px;padding-right:5px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-date,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-date{display:block;font-size:11px;color:#808080}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-delete-comment,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-delete-comment{text-decoration:none;position:absolute;right:0;top:0;color:#3B59A1;display:none;cursor:pointer}.rtmedia-item-comments .rt_media_comment_form textarea{width:100%;font-size:13px;height:50px}.mfp-content{width:90%}.mfp-content #buddypress .rtm-lightbox-container{background:#333;position:relative;-moz-box-shadow:0 0 10px rgba(0,0,0,0.5);-webkit-box-shadow:0 0 10px rgba(0,0,0,0.5);box-shadow:0 0 10px rgba(0,0,0,0.5);border:1px solid #222222}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media .tagcontainer{display:inline-block;max-width:calc(100% - 4px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media .tagcontainer img{max-height:calc(100% - 4px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta{background:#fff;overflow:hidden;padding:20px 0 0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents{max-height:100%;overflow-x:hidden;overflow-y:auto;padding:0 20px 0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents.logged-in{height:calc(97% - 80px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-media-title{font-size:16px;line-height:22px;margin:5px 0 10px 0}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-media-description{font-size:13px;line-height:20px;margin-bottom:10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtm-like-comments-info:before{top:13px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-content{font-size:12px;line-height:18px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-date{font-size:11px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-author{font-size:13px;line-height:18px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .username{padding:0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .userprofile{padding:0 10px 10px 0}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .userprofile .avatar{width:40px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments{position:absolute;bottom:10px;width:95%;padding:4px;background-color:#EDEFF4}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments .row{background:none}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments textarea{min-height:30px;max-height:40px;font-size:12px;line-height:14px;padding:4px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments .rt_media_comment_submit{background-color:#5B74A8;border-color:#29447E #1A356E;color:#FFFFFF;font-weight:bold}.mfp-content #buddypress .rtm-lightbox-container .rtm-mfp-close .mfp-close{height:20px;width:24px;font-size:20px;color:grey;line-height:20px;position:absolute;right:0;z-index:2;top:0;cursor:pointer;font-weight:bold}.mfp-content #buddypress .rtm-lightbox-container .mfp-arrow{background:none;border:none;display:none}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container{padding:0 !important}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .mfp-arrow,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .rtm-ltb-title-container,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .rtm-ltb-action-container{display:block;z-index:99}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container{background-color:rgba(0,0,0,0.6);padding:0 10px;color:#fff;position:absolute;width:100%;display:none}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions{display:inline-block;vertical-align:middle;text-align:right}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions form{display:inline}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .click-nav{float:right;margin-right:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button{font-weight:bold;color:#fff;font-size:12px;opacity:0.7;padding:4px 8px}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button:hover{opacity:1}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options{background-color:white}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options:before{border-color:transparent transparent #fff}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li{display:block}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons{width:100%;color:#000}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons:hover{color:#21759B}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container{top:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title{font-size:14px;width:55%;overflow:hidden;float:left;line-height:30px;max-height:30px}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title a{text-decoration:none;color:#fff;opacity:0.7}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title a:hover{opacity:1}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title span{opacity:0.5}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-50,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-100{float:left;overflow:hidden}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-50{max-width:50%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-100{max-width:100%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-album-name{max-width:50%;display:inline-block;overflow:hidden}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions{text-align:right;width:44%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container{bottom:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions{text-align:right;display:inline-block;max-width:69%;float:right}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtm-ltb-gallery-title{display:inline-block;width:30%}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-content #buddypress .rtm-lightbox-container #rtm-mejs-video-container{max-width:100%}.mfp-content #buddypress .rtm-lightbox-container #rtm-mejs-video-container{display:inline-block;vertical-align:middle}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio{display:inline-block;max-width:400px}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls{margin-left:25px;width:79%}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls .mejs-time-rail{width:134px}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls .mejs-time-rail .mejs-time-total{width:124px}.rtmedia-admin-notice{padding:4px;text-align:center;margin:2px 0}.rtmedia-info{color:green}.rtmedia-warning{color:red}.mfp-content #rtmedia-single-media-container .wp-audio-shortcode{margin-left:30px}#rtm-media-options .click-nav{position:relative;float:left;margin-right:10px}.rtm-lightbox-container #rtm-media-options-list.click-nav{position:relative}.rtm-lightbox-container #rtm-media-options-list ul{left:-85px}#rtm-media-options ul,.rtm-lightbox-container #rtm-media-options-list ul{position:absolute;right:0;width:170px;z-index:30;padding:10px 5px;background-color:#37454D;margin-top:12px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}#rtm-media-options ul:before,.rtm-lightbox-container #rtm-media-options-list ul:before{content:'';border-width:12px;border-style:inset inset solid;display:block;position:absolute;z-index:9;top:-24px;right:20px;border-color:transparent transparent #37454d}#rtm-media-options ul .clicker,.rtm-lightbox-container #rtm-media-options-list ul .clicker{position:relative}#rtm-media-options ul li,.rtm-lightbox-container #rtm-media-options-list ul li{padding:0 5px;list-style:none}#rtm-media-options ul li form,.rtm-lightbox-container #rtm-media-options-list ul li form{display:block}#rtm-media-options ul li .rtmedia-action-buttons,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons{display:block;padding:8px;color:#fff;width:100%;text-align:left;margin:0;font-size:12px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}#rtm-media-options ul li .rtmedia-action-buttons:hover,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons:hover{background-color:#EDEFF4;color:#2284B5}.click-nav .no-js ul{display:none}.click-nav .no-js:hover ul{display:block}.morecontent span{display:none}.rtmedia-footer-link{text-align:center;padding:7px}#bp-default .rtmedia-container embed,#bp-default .rtmedia-activity-container embed{height:100%}#bp-default .rtmedia-container .me-plugin,#bp-default .rtmedia-activity-container .me-plugin{height:100%}#bp-default .rtmedia-activity-container .mejs-overlay-button{margin-left:-50px}.rtmedia-save-album{margin-top:15px}.rtmedia-popup{position:relative;background:#FFF;padding:20px;width:auto;max-width:600px;margin:20px auto}.rtmedia-popup .rtm-modal-title{font-size:24px;line-height:24px;margin-bottom:30px;margin-top:0}.rtmedia-popup .rtm-input-medium{width:55%}.rtmedia-popup input,.rtmedia-popup select{margin-right:10px}.rtmedia-popup p{margin-bottom:10px}.rtmedia-popup label{min-width:90px;display:inline-block}.rtmedia-popup>div button{font-size:13px;color:#777;padding:6px 14px;background:#fff;border:1px solid #c1c1c1}.rtmedia-popup>div button:hover{background:#EDEDED}#buddypress #whats-new-options .rtmedia-plupload-container{float:left}#buddypress #whats-new-options #rtmedia-whts-new-upload-container{margin-top:12px}#buddypress #whats-new-options #rtmedia-add-media-button-post-update{margin-top:12px;float:left;margin-right:20px}.rtmedia-list.masonry .rtmedia-list-item,.rtmedia-list.masonry .rtmedia-list-item .rtmedia-item-thumbnail{display:block;position:relative}.rtmedia-list.masonry .rtmedia-list-item:hover .rtmedia-item-title,.rtmedia-list.masonry .rtmedia-list-item .rtmedia-item-thumbnail:hover .rtmedia-item-title{display:block}.rtmedia-list.masonry .rtmedia-item-title{position:absolute;bottom:0;max-width:100%;display:none;width:100%;background-color:rgba(0,0,0,0.6)}.rtmedia-list.masonry .rtmedia-item-title h4{font-size:inherit;color:#ffffff}.rtmedia-list.masonry .rtmedia-item-title a{color:#ffffff}.rtmedia-list.masonry .rtmedia-item-title a:hover{color:#ffffff}.rtmedia-list.masonry .rtmedia-list-item{margin:3px}.rtmedia-list.masonry .rtmedia-list-item a h4{font-size:inherit;padding:5px 2px}
|
app/assets/img/rtmedia-membership-240x184.png
ADDED
Binary file
|
app/assets/js/rtMedia.backbone.js
CHANGED
@@ -221,7 +221,7 @@ jQuery( function ( $ ) {
|
|
221 |
$( that.el ).siblings( '.rtmedia_next_prev' ).children( '#rtMedia-galary-next' ).show();
|
222 |
//$("#rtMedia-galary-next").show();
|
223 |
}
|
224 |
-
if( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" ) {
|
225 |
rtm_masonry_reload( rtm_masonry_container );
|
226 |
}
|
227 |
},
|
@@ -351,6 +351,7 @@ jQuery( function ( $ ) {
|
|
351 |
}
|
352 |
}
|
353 |
jQuery( '.start-media-upload' ).hide();
|
|
|
354 |
} );
|
355 |
|
356 |
uploaderObj.uploader.bind( 'FilesAdded', function ( up, files ) {
|
@@ -528,6 +529,11 @@ jQuery( function ( $ ) {
|
|
528 |
if ( file.percent == 100 ) {
|
529 |
$( "#" + file.id ).toggleClass( 'upload-success' );
|
530 |
}
|
|
|
|
|
|
|
|
|
|
|
531 |
} );
|
532 |
uploaderObj.uploader.bind( 'BeforeUpload', function ( up, file ) {
|
533 |
up.settings.multipart_params.title = file.title.split( '.' )[ 0 ];
|
@@ -900,6 +906,7 @@ jQuery( document ).ready( function ( $ ) {
|
|
900 |
$( "#rtMedia-queue-list tr" ).remove();
|
901 |
$( "#rtm-upload-start-notice" ).hide();
|
902 |
//$("#aw-whats-new-submit").removeAttr('disabled');
|
|
|
903 |
} );
|
904 |
objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
|
905 |
$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
|
@@ -908,6 +915,10 @@ jQuery( document ).ready( function ( $ ) {
|
|
908 |
$( "#" + file.id ).toggleClass( 'upload-success' );
|
909 |
}
|
910 |
|
|
|
|
|
|
|
|
|
911 |
} );
|
912 |
|
913 |
$( "#rtMedia-start-upload" ).hide();
|
@@ -940,7 +951,7 @@ jQuery( document ).ready( function ( $ ) {
|
|
940 |
options.beforeSend = function () {
|
941 |
if ( originalOptions.data.action == 'post_update' ) {
|
942 |
if ( $.trim( $( "#whats-new" ).val() ) == "" ) {
|
943 |
-
|
944 |
$("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
|
945 |
return false;
|
946 |
}
|
221 |
$( that.el ).siblings( '.rtmedia_next_prev' ).children( '#rtMedia-galary-next' ).show();
|
222 |
//$("#rtMedia-galary-next").show();
|
223 |
}
|
224 |
+
if( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" && jQuery( '.rtmedia-container .rtmedia-list.rtm-no-masonry' ).length == 0 ) {
|
225 |
rtm_masonry_reload( rtm_masonry_container );
|
226 |
}
|
227 |
},
|
351 |
}
|
352 |
}
|
353 |
jQuery( '.start-media-upload' ).hide();
|
354 |
+
window.onbeforeunload = null;
|
355 |
} );
|
356 |
|
357 |
uploaderObj.uploader.bind( 'FilesAdded', function ( up, files ) {
|
529 |
if ( file.percent == 100 ) {
|
530 |
$( "#" + file.id ).toggleClass( 'upload-success' );
|
531 |
}
|
532 |
+
|
533 |
+
window.onbeforeunload = function (evt) {
|
534 |
+
var message = rtmedia_upload_progress_error_message;
|
535 |
+
return message;
|
536 |
+
};
|
537 |
} );
|
538 |
uploaderObj.uploader.bind( 'BeforeUpload', function ( up, file ) {
|
539 |
up.settings.multipart_params.title = file.title.split( '.' )[ 0 ];
|
906 |
$( "#rtMedia-queue-list tr" ).remove();
|
907 |
$( "#rtm-upload-start-notice" ).hide();
|
908 |
//$("#aw-whats-new-submit").removeAttr('disabled');
|
909 |
+
window.onbeforeunload = null;
|
910 |
} );
|
911 |
objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
|
912 |
$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
|
915 |
$( "#" + file.id ).toggleClass( 'upload-success' );
|
916 |
}
|
917 |
|
918 |
+
window.onbeforeunload = function (evt) {
|
919 |
+
var message = rtmedia_upload_progress_error_message;
|
920 |
+
return message;
|
921 |
+
};
|
922 |
} );
|
923 |
|
924 |
$( "#rtMedia-start-upload" ).hide();
|
951 |
options.beforeSend = function () {
|
952 |
if ( originalOptions.data.action == 'post_update' ) {
|
953 |
if ( $.trim( $( "#whats-new" ).val() ) == "" ) {
|
954 |
+
$('#whats-new-form' ).prepend( '<div id="message" class="error"><p>' + rtmedia_empty_activity_msg + '</p></div>' );
|
955 |
$("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
|
956 |
return false;
|
957 |
}
|
app/assets/js/rtMedia.js
CHANGED
@@ -437,34 +437,43 @@ jQuery('document').ready(function($) {
|
|
437 |
});
|
438 |
}
|
439 |
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
|
|
|
|
|
|
448 |
activityArea.addClass('rtm-drag-drop-active');
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
|
469 |
|
470 |
function rtmedia_init_media_deleting() {
|
@@ -515,7 +524,7 @@ jQuery('document').ready(function($) {
|
|
515 |
}
|
516 |
|
517 |
// masonry code
|
518 |
-
if( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" ) {
|
519 |
rtm_masonry_container = jQuery('.rtmedia-container .rtmedia-list')
|
520 |
rtm_masonry_container.masonry({
|
521 |
itemSelector: '.rtmedia-list-item'
|
@@ -627,7 +636,7 @@ function rtm_masonry_reload( el ) {
|
|
627 |
}
|
628 |
|
629 |
window.onload=function(){
|
630 |
-
if( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" ) {
|
631 |
rtm_masonry_reload( rtm_masonry_container );
|
632 |
}
|
633 |
};
|
437 |
});
|
438 |
}
|
439 |
|
440 |
+
var dragArea = jQuery("#drag-drop-area");
|
441 |
+
var activityArea = jQuery('#whats-new');
|
442 |
+
var content = dragArea.html();
|
443 |
+
jQuery('#rtmedia-upload-container').after("<h2 id='rtm-drop-files-title'>" + rtmedia_drop_media_msg + "</h2>");
|
444 |
+
if( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ){
|
445 |
+
jQuery('#whats-new-textarea').after("<h2 id='rtm-drop-files-title'>" + rtmedia_drop_media_msg + "</h2>");
|
446 |
+
}
|
447 |
+
jQuery(document)
|
448 |
+
.on('dragover', function(e) {
|
449 |
+
jQuery('#rtm-media-gallery-uploader').show();
|
450 |
+
if( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ){
|
451 |
activityArea.addClass('rtm-drag-drop-active');
|
452 |
+
}
|
453 |
+
|
454 |
+
// activityArea.css('height','150px');
|
455 |
+
dragArea.addClass('rtm-drag-drop-active');
|
456 |
+
jQuery('#rtm-drop-files-title').css('display', 'block');
|
457 |
+
})
|
458 |
+
.on("dragleave", function(e){
|
459 |
+
e.preventDefault();
|
460 |
+
if( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ){
|
461 |
+
activityArea.removeClass('rtm-drag-drop-active');
|
462 |
+
activityArea.removeAttr('style');
|
463 |
+
}
|
464 |
+
dragArea.removeClass('rtm-drag-drop-active');
|
465 |
+
jQuery('#rtm-drop-files-title').hide();
|
466 |
+
|
467 |
+
})
|
468 |
+
.on("drop", function(e){
|
469 |
+
e.preventDefault();
|
470 |
+
if( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ){
|
471 |
+
activityArea.removeClass('rtm-drag-drop-active');
|
472 |
+
activityArea.removeAttr('style');
|
473 |
+
}
|
474 |
+
dragArea.removeClass('rtm-drag-drop-active');
|
475 |
+
jQuery('#rtm-drop-files-title').hide();
|
476 |
+
});
|
477 |
|
478 |
|
479 |
function rtmedia_init_media_deleting() {
|
524 |
}
|
525 |
|
526 |
// masonry code
|
527 |
+
if( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" && jQuery( '.rtmedia-container .rtmedia-list.rtm-no-masonry' ).length == 0 ) {
|
528 |
rtm_masonry_container = jQuery('.rtmedia-container .rtmedia-list')
|
529 |
rtm_masonry_container.masonry({
|
530 |
itemSelector: '.rtmedia-list-item'
|
636 |
}
|
637 |
|
638 |
window.onload=function(){
|
639 |
+
if( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" && jQuery( '.rtmedia-container .rtmedia-list.rtm-no-masonry' ).length == 0 ) {
|
640 |
rtm_masonry_reload( rtm_masonry_container );
|
641 |
}
|
642 |
};
|
app/assets/sass/main.scss
CHANGED
@@ -230,6 +230,9 @@
|
|
230 |
}
|
231 |
}
|
232 |
}
|
|
|
|
|
|
|
233 |
}
|
234 |
|
235 |
.rtmedia-media img {
|
@@ -600,6 +603,7 @@
|
|
600 |
padding:10px;
|
601 |
.rtmedia-item-thumbnail{
|
602 |
overflow:hidden;
|
|
|
603 |
}
|
604 |
|
605 |
&.media-type-video{
|
230 |
}
|
231 |
}
|
232 |
}
|
233 |
+
.rtmedia-list-item.media-type-photo {
|
234 |
+
width: 100%;
|
235 |
+
}
|
236 |
}
|
237 |
|
238 |
.rtmedia-media img {
|
603 |
padding:10px;
|
604 |
.rtmedia-item-thumbnail{
|
605 |
overflow:hidden;
|
606 |
+
margin: 0 auto;
|
607 |
}
|
608 |
|
609 |
&.media-type-video{
|
app/helper/RTMediaActivityModel.php
CHANGED
@@ -6,17 +6,17 @@
|
|
6 |
* Time: 2:32 PM
|
7 |
*/
|
8 |
|
9 |
-
if( !class_exists( 'RTDBModel' ) ){
|
10 |
return;
|
11 |
}
|
12 |
|
13 |
class RTMediaActivityModel extends RTDBModel {
|
14 |
|
15 |
-
function __construct
|
16 |
-
parent::__construct
|
17 |
}
|
18 |
|
19 |
-
function get( $columns, $offset=false, $per_page=false, $order_by= 'activity_id DESC' ) {
|
20 |
$columns['blog_id'] = get_current_blog_id();
|
21 |
return parent::get( $columns, $offset, $per_page, $order_by );
|
22 |
}
|
@@ -31,8 +31,8 @@ class RTMediaActivityModel extends RTDBModel {
|
|
31 |
return parent::update( $data, $where );
|
32 |
}
|
33 |
|
34 |
-
public function check( $activity_id =
|
35 |
-
if( $activity_id ==
|
36 |
return false;
|
37 |
}
|
38 |
|
@@ -43,7 +43,7 @@ class RTMediaActivityModel extends RTDBModel {
|
|
43 |
|
44 |
$results = $this->get( $columns );
|
45 |
|
46 |
-
if( $results ){
|
47 |
return true;
|
48 |
} else {
|
49 |
return false;
|
6 |
* Time: 2:32 PM
|
7 |
*/
|
8 |
|
9 |
+
if ( ! class_exists( 'RTDBModel' ) ){
|
10 |
return;
|
11 |
}
|
12 |
|
13 |
class RTMediaActivityModel extends RTDBModel {
|
14 |
|
15 |
+
function __construct() {
|
16 |
+
parent::__construct( 'rtm_activity', false, 10, true );
|
17 |
}
|
18 |
|
19 |
+
function get( $columns, $offset = false, $per_page = false, $order_by = 'activity_id DESC' ) {
|
20 |
$columns['blog_id'] = get_current_blog_id();
|
21 |
return parent::get( $columns, $offset, $per_page, $order_by );
|
22 |
}
|
31 |
return parent::update( $data, $where );
|
32 |
}
|
33 |
|
34 |
+
public function check( $activity_id = '' ) {
|
35 |
+
if ( $activity_id == '' ){
|
36 |
return false;
|
37 |
}
|
38 |
|
43 |
|
44 |
$results = $this->get( $columns );
|
45 |
|
46 |
+
if ( $results ){
|
47 |
return true;
|
48 |
} else {
|
49 |
return false;
|
app/helper/RTMediaAddon.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
/**
|
4 |
* Description of RTMediaAddon
|
5 |
*
|
6 |
-
* @package
|
7 |
* @subpackage Admin
|
8 |
*
|
9 |
-
* @author
|
10 |
-
* @author
|
11 |
*/
|
12 |
if ( ! class_exists( 'RTMediaAddon' ) ){
|
13 |
|
@@ -19,37 +19,40 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
19 |
* Show coming_soon_div.
|
20 |
*
|
21 |
* @access public
|
|
|
22 |
* @param void
|
|
|
23 |
* @return void
|
24 |
*/
|
25 |
-
public function coming_soon_div()
|
26 |
-
return
|
27 |
-
'<div class="coming-soon coming-soon-l"></div>
|
28 |
-
<a class="coming-soon coming-soon-r" href="' . $this->enquiry_link . '" target="_blank">'
|
29 |
-
//<a></a>
|
30 |
-
. '</a>';
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
* Render addons.
|
35 |
*
|
36 |
* @access public
|
|
|
37 |
* @param type $page
|
|
|
38 |
* @return void
|
39 |
*/
|
40 |
-
public static function render_addons( $page = '' )
|
41 |
global $wp_settings_sections, $wp_settings_fields;
|
42 |
|
43 |
-
if ( ! isset( $wp_settings_sections ) || !isset( $wp_settings_sections[$page] ) )
|
44 |
return;
|
|
|
45 |
|
46 |
-
foreach ( (array) $wp_settings_sections[$page] as $section ) {
|
47 |
|
48 |
-
if ( $section['callback'] )
|
49 |
call_user_func( $section['callback'], $section );
|
|
|
50 |
|
51 |
-
if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) )
|
52 |
continue;
|
|
|
53 |
|
54 |
echo '<table class="form-table">';
|
55 |
do_settings_fields( $page, $section['id'] );
|
@@ -61,10 +64,12 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
61 |
* Get addons for Audio/Video Encoding and Plugins.
|
62 |
*
|
63 |
* @access public
|
|
|
64 |
* @param void
|
|
|
65 |
* @return void
|
66 |
*/
|
67 |
-
public function get_addons()
|
68 |
$tabs = array();
|
69 |
global $rtmedia_admin;
|
70 |
$tabs[] = array(
|
@@ -90,44 +95,51 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
90 |
|
91 |
?>
|
92 |
<div id="rtm-addons">
|
93 |
-
|
94 |
-
|
95 |
<?php
|
96 |
-
|
97 |
-
|
98 |
$active_class = '';
|
99 |
-
if(
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
104 |
<?php
|
105 |
-
|
106 |
?>
|
107 |
-
|
108 |
|
109 |
<?php
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
127 |
?>
|
128 |
-
|
129 |
</div>
|
130 |
-
|
131 |
}
|
132 |
|
133 |
|
@@ -135,76 +147,107 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
135 |
* Display plugins in Addons Section.
|
136 |
*
|
137 |
* @access public
|
|
|
138 |
* @param array $args
|
|
|
139 |
* @return void
|
140 |
*/
|
141 |
-
public function plugins_content( $args = '' )
|
142 |
-
$img_src = RTMEDIA_URL .'app/assets/img/';
|
143 |
-
$addons
|
|
|
144 |
array(
|
145 |
'title' => __( 'rtMedia Photo Watermark', 'rtmedia' ),
|
146 |
-
'img_src' => $img_src.'rtmedia-watermark-240x184.png',
|
147 |
'product_link' => 'http://rtcamp.com/store/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
148 |
-
'desc' => '<p>' . __( 'rtMedia Photo Watermark add-on let you add text or copyright on your images uploaded using rtMedia.', 'rtmedia' ) . '</p>
|
149 |
-
<p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have either ImageMagick or GD library installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
150 |
'price' => '$49',
|
151 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
152 |
-
'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media'
|
|
|
153 |
),
|
154 |
array(
|
155 |
'title' => __( 'rtMedia Photo Tagging', 'rtmedia' ),
|
156 |
-
'img_src' => $img_src.'rtmedia-phototagging-240x184.png',
|
157 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
158 |
-
'desc' => '<p>' . __( 'rtMedia Photo Tagging add-on enables tagging on photos uploaded using BuddyPress Media.', 'rtmedia' ) . '</p>
|
159 |
-
<p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
160 |
'price' => '$49',
|
161 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
162 |
-
'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media'
|
|
|
163 |
),
|
164 |
array(
|
165 |
'title' => __( 'rtMedia Instagram', 'rtmedia' ),
|
166 |
-
'img_src' => $img_src.'rtmedia-instagram-240x184.png',
|
167 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
168 |
-
'desc' => '<p>' . __( 'rtMedia Instagram adds Instagram like filters to images uploaded with rtMedia.', 'rtmedia' ) . '</p>
|
169 |
-
<p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
170 |
'price' => '$49',
|
171 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
172 |
-
'buy_now' => 'https://rtcamp.com/store/rtmedia-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media'
|
|
|
173 |
),
|
|
|
|
|
174 |
array(
|
175 |
'title' => __( 'rtMedia Kaltura Add-on', 'rtmedia' ),
|
176 |
-
'img_src' => $img_src.'rtmedia-kaltura-240x184.png',
|
177 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
178 |
-
'desc' => '<p>' . __( 'Add support for more video formats using Kaltura video solution.', 'rtmedia' ) . '</p>
|
179 |
-
<p>' . __( 'Works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', 'rtmedia' ) . '</p>',
|
180 |
'price' => '$199',
|
181 |
'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
182 |
-
'buy_now' => 'https://rtcamp.com/store/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media'
|
|
|
183 |
),
|
184 |
array(
|
185 |
'title' => __( 'rtMedia FFMPEG Add-on', 'rtmedia' ),
|
186 |
-
'img_src' => $img_src.'rtmedia-ffmpeg-240x184.png',
|
187 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-ffmpeg-converter/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
188 |
-
'desc' => '<p>' . __( 'Add supports for more audio & video formats using open-source media-node.', 'rtmedia' ) . '</p>
|
189 |
-
<p>' . __( 'Media node comes with automated setup script for Ubuntu/Debian.', 'rtmedia' ) . '</p>',
|
190 |
'price' => '$199',
|
191 |
'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
192 |
-
'buy_now' => 'https://rtcamp.com/store/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media'
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
);
|
195 |
-
$addons
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
$this->addon( $value );
|
209 |
}
|
210 |
}
|
@@ -213,10 +256,12 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
213 |
* services_content.
|
214 |
*
|
215 |
* @access public
|
|
|
216 |
* @param array $args
|
|
|
217 |
* @return void
|
218 |
*/
|
219 |
-
public function services_content( $args = '' )
|
220 |
$objEncoding->encoding_service_intro();
|
221 |
}
|
222 |
|
@@ -224,42 +269,45 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
224 |
* themes_content.
|
225 |
*
|
226 |
* @access public
|
|
|
227 |
* @param array $args
|
|
|
228 |
* @return void
|
229 |
*/
|
230 |
-
public function themes_content( $args = '' )
|
231 |
-
echo '<h3>'. __( 'Coming Soon !!', 'rtmedia' ) .'</h3>';
|
232 |
}
|
233 |
|
234 |
|
235 |
-
|
236 |
/**
|
237 |
* Define addon.
|
238 |
*
|
239 |
* @global type $rtmedia
|
|
|
240 |
* @param array $args
|
|
|
241 |
* @return void
|
242 |
*/
|
243 |
-
public function addon( $args )
|
244 |
global $rtmedia;
|
245 |
|
246 |
$defaults = array(
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
);
|
256 |
-
$args
|
257 |
extract( $args );
|
258 |
|
259 |
$coming_soon ? ' coming-soon' : '';
|
260 |
|
261 |
$coming_soon_div = ( $coming_soon ) ? $this->coming_soon_div() : '';
|
262 |
-
$addon
|
263 |
<a href="' . $product_link . '" title="' . $title . '" target="_blank">
|
264 |
<img width="240" height="184" title="' . $title . '" alt="' . $title . '" src="' . $img_src . '">
|
265 |
</a>
|
@@ -269,11 +317,11 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
269 |
</div>
|
270 |
<div class="product_footer">
|
271 |
<span class="price alignleft"><span class="amount">' . $price . '</span></span>
|
272 |
-
<a class="add_to_cart_button alignright product_type_simple" href="' . $buy_now . '" target="_blank">' . __('Buy Now', 'rtmedia') . '</a>
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
echo $addon;
|
278 |
}
|
279 |
|
3 |
/**
|
4 |
* Description of RTMediaAddon
|
5 |
*
|
6 |
+
* @package rtMedia
|
7 |
* @subpackage Admin
|
8 |
*
|
9 |
+
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
10 |
+
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
11 |
*/
|
12 |
if ( ! class_exists( 'RTMediaAddon' ) ){
|
13 |
|
19 |
* Show coming_soon_div.
|
20 |
*
|
21 |
* @access public
|
22 |
+
*
|
23 |
* @param void
|
24 |
+
*
|
25 |
* @return void
|
26 |
*/
|
27 |
+
public function coming_soon_div(){
|
28 |
+
return '<div class="coming-soon coming-soon-l"></div> <a class="coming-soon coming-soon-r" href="' . $this->enquiry_link . '" target="_blank"></a>';
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
* Render addons.
|
33 |
*
|
34 |
* @access public
|
35 |
+
*
|
36 |
* @param type $page
|
37 |
+
*
|
38 |
* @return void
|
39 |
*/
|
40 |
+
public static function render_addons( $page = '' ){
|
41 |
global $wp_settings_sections, $wp_settings_fields;
|
42 |
|
43 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
44 |
return;
|
45 |
+
}
|
46 |
|
47 |
+
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
48 |
|
49 |
+
if ( $section['callback'] ){
|
50 |
call_user_func( $section['callback'], $section );
|
51 |
+
}
|
52 |
|
53 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
54 |
continue;
|
55 |
+
}
|
56 |
|
57 |
echo '<table class="form-table">';
|
58 |
do_settings_fields( $page, $section['id'] );
|
64 |
* Get addons for Audio/Video Encoding and Plugins.
|
65 |
*
|
66 |
* @access public
|
67 |
+
*
|
68 |
* @param void
|
69 |
+
*
|
70 |
* @return void
|
71 |
*/
|
72 |
+
public function get_addons(){
|
73 |
$tabs = array();
|
74 |
global $rtmedia_admin;
|
75 |
$tabs[] = array(
|
95 |
|
96 |
?>
|
97 |
<div id="rtm-addons">
|
98 |
+
<div class="horizontal-tabs">
|
99 |
+
<dl class='tabs' data-tab>
|
100 |
<?php
|
101 |
+
$i = 1;
|
102 |
+
foreach ( $tabs as $tab ) {
|
103 |
$active_class = '';
|
104 |
+
if ( 1 == $i ){
|
105 |
+
$active_class = 'active';
|
106 |
+
}
|
107 |
+
$i ++;
|
108 |
+
?>
|
109 |
+
<dd class="<?php echo $active_class ?>">
|
110 |
+
<a id="tab-<?php echo substr( $tab['href'], 1 ) ?>" title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href'] ?>" class="rtmedia-tab-title <?php echo sanitize_title( $tab['name'] ) ?>"><?php echo $tab['name'] ?></a>
|
111 |
+
</dd>
|
112 |
<?php
|
113 |
+
}
|
114 |
?>
|
115 |
+
</dl>
|
116 |
|
117 |
<?php
|
118 |
+
$k = 1;
|
119 |
+
$active_class = '';
|
120 |
+
echo "<div class='tabs-content'>";
|
121 |
+
foreach ( $tabs as $tab ) {
|
122 |
+
$active_class = '';
|
123 |
+
if ( 1 == $k ){
|
124 |
+
$active_class = ' active';
|
125 |
+
}
|
126 |
+
$k ++;
|
127 |
+
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
128 |
+
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
129 |
+
}
|
130 |
+
$tab_without_hash = explode( '#', $tab['href'] );
|
131 |
+
$tab_without_hash = $tab_without_hash[1];
|
132 |
+
echo '<div class="row content' . $active_class . '" id="' . $tab_without_hash . '">';
|
133 |
+
echo '<div class="large-12 columns">';
|
134 |
+
call_user_func( $tab['callback'] );
|
135 |
+
echo '</div>';
|
136 |
+
echo '</div>';
|
137 |
+
}
|
138 |
+
echo '</div>';
|
139 |
?>
|
140 |
+
</div>
|
141 |
</div>
|
142 |
+
<?php
|
143 |
}
|
144 |
|
145 |
|
147 |
* Display plugins in Addons Section.
|
148 |
*
|
149 |
* @access public
|
150 |
+
*
|
151 |
* @param array $args
|
152 |
+
*
|
153 |
* @return void
|
154 |
*/
|
155 |
+
public function plugins_content( $args = '' ){
|
156 |
+
$img_src = RTMEDIA_URL . 'app/assets/img/';
|
157 |
+
$addons = array(
|
158 |
+
'photo' => array(
|
159 |
array(
|
160 |
'title' => __( 'rtMedia Photo Watermark', 'rtmedia' ),
|
161 |
+
'img_src' => $img_src . 'rtmedia-watermark-240x184.png',
|
162 |
'product_link' => 'http://rtcamp.com/store/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
163 |
+
'desc' => '<p>' . __( 'rtMedia Photo Watermark add-on let you add text or copyright on your images uploaded using rtMedia.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have either ImageMagick or GD library installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
|
|
164 |
'price' => '$49',
|
165 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
166 |
+
'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
167 |
+
'category' => 'photo',
|
168 |
),
|
169 |
array(
|
170 |
'title' => __( 'rtMedia Photo Tagging', 'rtmedia' ),
|
171 |
+
'img_src' => $img_src . 'rtmedia-phototagging-240x184.png',
|
172 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
173 |
+
'desc' => '<p>' . __( 'rtMedia Photo Tagging add-on enables tagging on photos uploaded using BuddyPress Media.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
|
|
174 |
'price' => '$49',
|
175 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
176 |
+
'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
177 |
+
'category' => 'photo',
|
178 |
),
|
179 |
array(
|
180 |
'title' => __( 'rtMedia Instagram', 'rtmedia' ),
|
181 |
+
'img_src' => $img_src . 'rtmedia-instagram-240x184.png',
|
182 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
183 |
+
'desc' => '<p>' . __( 'rtMedia Instagram adds Instagram like filters to images uploaded with rtMedia.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
|
|
184 |
'price' => '$49',
|
185 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
186 |
+
'buy_now' => 'https://rtcamp.com/store/rtmedia-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
187 |
+
'category' => 'photo',
|
188 |
),
|
189 |
+
),
|
190 |
+
'video'=> array(
|
191 |
array(
|
192 |
'title' => __( 'rtMedia Kaltura Add-on', 'rtmedia' ),
|
193 |
+
'img_src' => $img_src . 'rtmedia-kaltura-240x184.png',
|
194 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
195 |
+
'desc' => '<p>' . __( 'Add support for more video formats using Kaltura video solution.', 'rtmedia' ) . '</p> <p>' . __( 'Works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', 'rtmedia' ) . '</p>',
|
|
|
196 |
'price' => '$199',
|
197 |
'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
198 |
+
'buy_now' => 'https://rtcamp.com/store/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
199 |
+
'category' => 'video',
|
200 |
),
|
201 |
array(
|
202 |
'title' => __( 'rtMedia FFMPEG Add-on', 'rtmedia' ),
|
203 |
+
'img_src' => $img_src . 'rtmedia-ffmpeg-240x184.png',
|
204 |
'product_link' => 'http://rtcamp.com/store/buddypress-media-ffmpeg-converter/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
205 |
+
'desc' => '<p>' . __( 'Add supports for more audio & video formats using open-source media-node.', 'rtmedia' ) . '</p> <p>' . __( 'Media node comes with automated setup script for Ubuntu/Debian.', 'rtmedia' ) . '</p>',
|
|
|
206 |
'price' => '$199',
|
207 |
'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
208 |
+
'buy_now' => 'https://rtcamp.com/store/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
209 |
+
'category' => 'video',
|
210 |
+
),
|
211 |
+
),
|
212 |
+
'membership'=> array(
|
213 |
+
array(
|
214 |
+
'title' => __( 'rtMedia Membership Add-on', 'rtmedia' ),
|
215 |
+
'img_src' => $img_src . 'rtmedia-membership-240x184.png',
|
216 |
+
'product_link' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
217 |
+
'desc' => '<p>' . __( 'rtMedia Membership addon provides membership functionality in your site.', 'rtmedia' ) . '</p> <p>' . __( 'It controls the number of files a member can upload and size of the files uploaded based on membership group.', 'rtmedia' ) . '</p>',
|
218 |
+
'price' => '$99',
|
219 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
220 |
+
'category' => 'membership',
|
221 |
+
),
|
222 |
+
),
|
223 |
);
|
224 |
+
$addons = apply_filters( 'rtmedia_addons', $addons );
|
225 |
+
|
226 |
+
$photo_addons = $addons['photo'];
|
227 |
+
$video_addons = $addons['video'];
|
228 |
+
$membership_addons = $addons['membership'];
|
229 |
+
|
230 |
+
echo '<h3>';
|
231 |
+
_e( 'rtMedia Addons for Photos', 'rtmedia' );
|
232 |
+
echo '</h3>';
|
233 |
+
|
234 |
+
foreach ( $photo_addons as $key => $value ) {
|
235 |
+
$this->addon( $value );
|
236 |
+
}
|
237 |
+
|
238 |
+
echo '<h3>';
|
239 |
+
_e( 'rtMedia Addons for Audio/Video', 'rtmedia' );
|
240 |
+
echo '</h3>';
|
241 |
+
|
242 |
+
foreach ( $video_addons as $key => $value ) {
|
243 |
+
$this->addon( $value );
|
244 |
+
}
|
245 |
+
|
246 |
+
echo '<h3>';
|
247 |
+
_e( 'rtMedia Addon for Membership', 'rtmedia' );
|
248 |
+
echo '</h3>';
|
249 |
+
|
250 |
+
foreach ( $membership_addons as $key => $value ) {
|
251 |
$this->addon( $value );
|
252 |
}
|
253 |
}
|
256 |
* services_content.
|
257 |
*
|
258 |
* @access public
|
259 |
+
*
|
260 |
* @param array $args
|
261 |
+
*
|
262 |
* @return void
|
263 |
*/
|
264 |
+
public function services_content( $args = '' ){
|
265 |
$objEncoding->encoding_service_intro();
|
266 |
}
|
267 |
|
269 |
* themes_content.
|
270 |
*
|
271 |
* @access public
|
272 |
+
*
|
273 |
* @param array $args
|
274 |
+
*
|
275 |
* @return void
|
276 |
*/
|
277 |
+
public function themes_content( $args = '' ){
|
278 |
+
echo '<h3>' . __( 'Coming Soon !!', 'rtmedia' ) . '</h3>';
|
279 |
}
|
280 |
|
281 |
|
|
|
282 |
/**
|
283 |
* Define addon.
|
284 |
*
|
285 |
* @global type $rtmedia
|
286 |
+
*
|
287 |
* @param array $args
|
288 |
+
*
|
289 |
* @return void
|
290 |
*/
|
291 |
+
public function addon( $args ){
|
292 |
global $rtmedia;
|
293 |
|
294 |
$defaults = array(
|
295 |
+
'title' => '',
|
296 |
+
'img_src' => '',
|
297 |
+
'product_link' => '',
|
298 |
+
'desc' => '',
|
299 |
+
'price' => '',
|
300 |
+
'demo_link' => '',
|
301 |
+
'buy_now' => '',
|
302 |
+
'coming_soon' => false,
|
303 |
);
|
304 |
+
$args = wp_parse_args( $args, $defaults );
|
305 |
extract( $args );
|
306 |
|
307 |
$coming_soon ? ' coming-soon' : '';
|
308 |
|
309 |
$coming_soon_div = ( $coming_soon ) ? $this->coming_soon_div() : '';
|
310 |
+
$addon = '<div class="bp-media-addon">
|
311 |
<a href="' . $product_link . '" title="' . $title . '" target="_blank">
|
312 |
<img width="240" height="184" title="' . $title . '" alt="' . $title . '" src="' . $img_src . '">
|
313 |
</a>
|
317 |
</div>
|
318 |
<div class="product_footer">
|
319 |
<span class="price alignleft"><span class="amount">' . $price . '</span></span>
|
320 |
+
<a class="add_to_cart_button alignright product_type_simple" href="' . $buy_now . '" target="_blank">' . __( 'Buy Now', 'rtmedia' ) . '</a>';
|
321 |
+
if( $demo_link != '' ){
|
322 |
+
$addon .= '<a class="alignleft product_demo_link" href="' . $demo_link . '" title="' . $title . '" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>';
|
323 |
+
}
|
324 |
+
$addon .= '</div>' . $coming_soon_div . '</div>';
|
325 |
echo $addon;
|
326 |
}
|
327 |
|
app/helper/RTMediaAdminWidget.php
CHANGED
@@ -17,7 +17,7 @@ if ( ! class_exists( 'RTMediaAdminWidget' ) ){
|
|
17 |
* @param type $title
|
18 |
* @param type $content
|
19 |
*/
|
20 |
-
public function __construct( $id =
|
21 |
global $rtmedia;
|
22 |
if ( $id ){
|
23 |
?>
|
17 |
* @param type $title
|
18 |
* @param type $content
|
19 |
*/
|
20 |
+
public function __construct( $id = null, $title = null, $content = null ) {
|
21 |
global $rtmedia;
|
22 |
if ( $id ){
|
23 |
?>
|
app/helper/RTMediaFeed.php
CHANGED
@@ -20,7 +20,7 @@ class RTMediaFeed {
|
|
20 |
*/
|
21 |
public function __construct( $feed_url = '' ) {
|
22 |
if ( $feed_url ){
|
23 |
-
|
24 |
}
|
25 |
}
|
26 |
|
@@ -43,27 +43,26 @@ class RTMediaFeed {
|
|
43 |
// Figure out how many total items there are, but limit it to 5.
|
44 |
// $maxitems = $rss->get_item_quantity(5);
|
45 |
$maxitems = $rss->get_item_quantity( 3 );
|
46 |
-
|
47 |
// Build an array of all the items, starting with element 0 (first element).
|
48 |
$rss_items = $rss->get_items( 0, $maxitems );
|
49 |
}
|
50 |
?>
|
51 |
<ul><?php
|
52 |
-
if (
|
53 |
-
echo '<li>' . __('No items', 'rtmedia') . '.</li>';
|
54 |
} else {
|
55 |
// Loop through each feed item and display each item as a hyperlink.
|
56 |
foreach ( $rss_items as $item ) {
|
57 |
-
|
58 |
<li>
|
59 |
-
<a href='<?php echo $item->get_permalink(); ?>?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media' title='<?php echo __('Posted ', 'rtmedia') . $item->get_date('j F Y | g:i a'); ?>'><?php echo $item->get_title(); ?></a>
|
60 |
</li><?php
|
61 |
}
|
62 |
}
|
63 |
?>
|
64 |
</ul><?php
|
65 |
if ( DOING_AJAX ){
|
66 |
-
|
67 |
}
|
68 |
}
|
69 |
|
20 |
*/
|
21 |
public function __construct( $feed_url = '' ) {
|
22 |
if ( $feed_url ){
|
23 |
+
$this->feed_url = $feed_url;
|
24 |
}
|
25 |
}
|
26 |
|
43 |
// Figure out how many total items there are, but limit it to 5.
|
44 |
// $maxitems = $rss->get_item_quantity(5);
|
45 |
$maxitems = $rss->get_item_quantity( 3 );
|
|
|
46 |
// Build an array of all the items, starting with element 0 (first element).
|
47 |
$rss_items = $rss->get_items( 0, $maxitems );
|
48 |
}
|
49 |
?>
|
50 |
<ul><?php
|
51 |
+
if ( 0 == $maxitems ) {
|
52 |
+
echo '<li>' . __( 'No items', 'rtmedia' ) . '.</li>';
|
53 |
} else {
|
54 |
// Loop through each feed item and display each item as a hyperlink.
|
55 |
foreach ( $rss_items as $item ) {
|
56 |
+
?>
|
57 |
<li>
|
58 |
+
<a href='<?php echo $item->get_permalink(); ?>?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media' title='<?php echo __( 'Posted ', 'rtmedia' ) . $item->get_date( 'j F Y | g:i a' ); ?>'><?php echo $item->get_title(); ?></a>
|
59 |
</li><?php
|
60 |
}
|
61 |
}
|
62 |
?>
|
63 |
</ul><?php
|
64 |
if ( DOING_AJAX ){
|
65 |
+
die();
|
66 |
}
|
67 |
}
|
68 |
|
app/helper/RTMediaInteractionModel.php
CHANGED
@@ -18,33 +18,35 @@ class RTMediaInteractionModel extends RTDBModel {
|
|
18 |
* @access public
|
19 |
* @return void
|
20 |
*/
|
21 |
-
public function __construct
|
22 |
-
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
* Check user id and media id.
|
27 |
*
|
28 |
* @access public
|
|
|
29 |
* @param int $user_id
|
30 |
* @param int $media_id
|
31 |
* @param type $action
|
|
|
32 |
* @return bool
|
33 |
*/
|
34 |
-
public function check( $user_id =
|
35 |
-
if( $user_id ==
|
36 |
return false;
|
37 |
}
|
38 |
|
39 |
$columns = array(
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
);
|
44 |
|
45 |
$results = $this->get( $columns );
|
46 |
|
47 |
-
if( $results ){
|
48 |
return true;
|
49 |
} else {
|
50 |
return false;
|
@@ -55,20 +57,22 @@ class RTMediaInteractionModel extends RTDBModel {
|
|
55 |
* get a array of media details.
|
56 |
*
|
57 |
* @access public
|
|
|
58 |
* @param int $user_id
|
59 |
* @param int $media_id
|
60 |
* @param type $action
|
|
|
61 |
* @return type $results
|
62 |
*/
|
63 |
-
function get_row( $user_id =
|
64 |
-
if( $user_id ==
|
65 |
return false;
|
66 |
}
|
67 |
|
68 |
$columns = array(
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
);
|
73 |
|
74 |
$results = $this->get( $columns );
|
18 |
* @access public
|
19 |
* @return void
|
20 |
*/
|
21 |
+
public function __construct(){
|
22 |
+
parent::__construct( 'rtm_media_interaction', false, 10, true );
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
* Check user id and media id.
|
27 |
*
|
28 |
* @access public
|
29 |
+
*
|
30 |
* @param int $user_id
|
31 |
* @param int $media_id
|
32 |
* @param type $action
|
33 |
+
*
|
34 |
* @return bool
|
35 |
*/
|
36 |
+
public function check( $user_id = '', $media_id = '', $action = '' ){
|
37 |
+
if ( $user_id == '' || $media_id == '' || $action == '' ){
|
38 |
return false;
|
39 |
}
|
40 |
|
41 |
$columns = array(
|
42 |
+
'user_id' => $user_id,
|
43 |
+
'media_id' => $media_id,
|
44 |
+
'action' => $action,
|
45 |
);
|
46 |
|
47 |
$results = $this->get( $columns );
|
48 |
|
49 |
+
if ( $results ){
|
50 |
return true;
|
51 |
} else {
|
52 |
return false;
|
57 |
* get a array of media details.
|
58 |
*
|
59 |
* @access public
|
60 |
+
*
|
61 |
* @param int $user_id
|
62 |
* @param int $media_id
|
63 |
* @param type $action
|
64 |
+
*
|
65 |
* @return type $results
|
66 |
*/
|
67 |
+
function get_row( $user_id = '', $media_id = '', $action = '' ){
|
68 |
+
if ( $user_id == '' || $media_id == '' || $action == '' ){
|
69 |
return false;
|
70 |
}
|
71 |
|
72 |
$columns = array(
|
73 |
+
'user_id' => $user_id,
|
74 |
+
'media_id' => $media_id,
|
75 |
+
'action' => $action,
|
76 |
);
|
77 |
|
78 |
$results = $this->get( $columns );
|
app/helper/RTMediaLicense.php
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Created by PhpStorm.
|
4 |
* User: ritz
|
5 |
* Date: 18/9/14
|
6 |
* Time: 5:05 PM
|
7 |
*/
|
8 |
-
|
9 |
class RTMediaLicense {
|
10 |
|
11 |
static function render_themes( $page = '' ){
|
12 |
global $wp_actions;
|
13 |
|
14 |
-
if( has_action( 'rtmedia_addon_license_details' ) ){
|
15 |
-
|
16 |
-
|
17 |
<?php
|
18 |
}
|
19 |
|
20 |
do_action( 'rtmedia_addon_license_details' );
|
21 |
|
22 |
-
if( has_action( 'rtmedia_addon_license_details' ) ){
|
23 |
-
|
24 |
</div>
|
25 |
<?php
|
26 |
} else {
|
27 |
-
|
28 |
<div>You may be interested in <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ) ?>">rtMedia Addons</a>.</div>
|
29 |
-
|
30 |
}
|
31 |
}
|
32 |
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Created by PhpStorm.
|
5 |
* User: ritz
|
6 |
* Date: 18/9/14
|
7 |
* Time: 5:05 PM
|
8 |
*/
|
|
|
9 |
class RTMediaLicense {
|
10 |
|
11 |
static function render_themes( $page = '' ){
|
12 |
global $wp_actions;
|
13 |
|
14 |
+
if ( has_action( 'rtmedia_addon_license_details' ) ){
|
15 |
+
?>
|
16 |
+
<div id="rtm-licenses">
|
17 |
<?php
|
18 |
}
|
19 |
|
20 |
do_action( 'rtmedia_addon_license_details' );
|
21 |
|
22 |
+
if ( has_action( 'rtmedia_addon_license_details' ) ){
|
23 |
+
?>
|
24 |
</div>
|
25 |
<?php
|
26 |
} else {
|
27 |
+
?>
|
28 |
<div>You may be interested in <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ) ?>">rtMedia Addons</a>.</div>
|
29 |
+
<?php
|
30 |
}
|
31 |
}
|
32 |
|
app/helper/RTMediaModel.php
CHANGED
@@ -7,157 +7,170 @@
|
|
7 |
*/
|
8 |
class RTMediaModel extends RTDBModel {
|
9 |
|
10 |
-
function __construct
|
11 |
-
parent::__construct
|
12 |
-
$this->meta_table_name =
|
13 |
}
|
14 |
|
15 |
/**
|
16 |
*
|
17 |
* @param type $name
|
18 |
* @param type $arguments
|
|
|
19 |
* @return type
|
20 |
*/
|
21 |
-
function __call
|
22 |
-
$result = parent::__call
|
23 |
-
if ( ! $result[
|
24 |
-
|
25 |
}
|
|
|
26 |
return $result;
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
*
|
31 |
* @global type $wpdb
|
32 |
-
*
|
33 |
-
* @param type
|
34 |
-
* @param type
|
35 |
-
* @param type
|
|
|
|
|
36 |
* @return type
|
37 |
*/
|
38 |
-
function get
|
39 |
global $wpdb;
|
40 |
-
$select =
|
41 |
-
if( $count_flag ){
|
42 |
-
|
43 |
} else {
|
44 |
-
|
45 |
}
|
46 |
|
47 |
-
$from
|
48 |
-
$join
|
49 |
-
$where =
|
50 |
-
if( is_multisite() ){
|
51 |
-
|
52 |
}
|
53 |
$temp = 65;
|
54 |
foreach ( $columns as $colname => $colvalue ) {
|
55 |
-
|
56 |
foreach ( $colvalue as $meta_query ) {
|
57 |
-
if ( ! isset
|
58 |
-
$meta_query[
|
59 |
}
|
60 |
-
$tbl_alias = chr
|
61 |
-
if(is_multisite() ){
|
62 |
$join .= " LEFT JOIN {$wpdb->base_prefix}{$this->meta_table_name} as {$tbl_alias} ON {$this->table_name}.id = {$tbl_alias}.media_id ";
|
63 |
} else {
|
64 |
$join .= " LEFT JOIN {$wpdb->prefix}{$this->meta_table_name} as {$tbl_alias} ON {$this->table_name}.id = {$tbl_alias}.media_id ";
|
65 |
}
|
66 |
-
if ( isset
|
67 |
-
$where .= " AND ({$tbl_alias}.meta_key = '{$meta_query[
|
68 |
} else {
|
69 |
-
$where .= " AND {$tbl_alias}.meta_key = '{$meta_query[
|
70 |
}
|
71 |
}
|
72 |
-
|
73 |
-
if ( is_array
|
74 |
-
if ( ! isset
|
75 |
$compare = 'IN';
|
76 |
-
else
|
77 |
-
$compare = $colvalue[
|
|
|
78 |
|
79 |
-
$tmpVal
|
80 |
-
$col_val_comapare = ( is_array( $tmpVal ) ) ? '(\'' . implode
|
81 |
-
if(
|
82 |
-
$col_val_comapare = !empty( $colvalue[
|
83 |
}
|
84 |
$where .= " AND {$this->table_name}.{$colname} {$compare} {$col_val_comapare}";
|
85 |
} else {
|
86 |
$where .= " AND {$this->table_name}.{$colname} = '{$colvalue}'";
|
87 |
}
|
88 |
-
|
89 |
}
|
90 |
-
$qgroup_by =
|
91 |
-
if( $order_by ){
|
92 |
-
|
93 |
} else {
|
94 |
-
|
95 |
}
|
96 |
|
97 |
-
$select
|
98 |
-
$join
|
99 |
-
$where
|
100 |
-
$qgroup_by = apply_filters
|
101 |
-
$qorder_by = apply_filters
|
102 |
|
103 |
$sql = $select . $from . $join . $where . $qgroup_by . $qorder_by;
|
104 |
-
if(
|
105 |
-
|
106 |
-
|
|
|
107 |
|
108 |
-
|
109 |
-
|
|
|
110 |
|
111 |
-
|
112 |
-
|
|
|
113 |
|
114 |
-
|
115 |
-
|
|
|
116 |
|
117 |
-
|
118 |
-
|
119 |
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
-
if( ! $count_flag )
|
123 |
-
return $wpdb->get_results ( $sql );
|
124 |
-
else
|
125 |
-
return $wpdb->get_var ( $sql );
|
126 |
}
|
127 |
|
128 |
/**
|
129 |
*
|
130 |
* @param type $name
|
131 |
* @param type $arguments
|
|
|
132 |
* @return type
|
133 |
*/
|
134 |
-
function populate_results_fallback
|
135 |
-
$result[
|
136 |
-
if ( 'get_by_media_id' == $name && isset
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
|
|
159 |
}
|
160 |
-
|
|
|
161 |
}
|
162 |
|
163 |
/**
|
@@ -166,14 +179,15 @@ class RTMediaModel extends RTDBModel {
|
|
166 |
* @param type $offset
|
167 |
* @param type $per_page
|
168 |
* @param type $order_by
|
|
|
169 |
* @return type
|
170 |
*/
|
171 |
-
function get_media
|
172 |
-
if ( is_multisite
|
173 |
-
$order_by =
|
174 |
}
|
175 |
|
176 |
-
$results = $this->get
|
177 |
|
178 |
return $results;
|
179 |
}
|
@@ -184,41 +198,52 @@ class RTMediaModel extends RTDBModel {
|
|
184 |
* @param type $offset
|
185 |
* @param type $per_page
|
186 |
* @param type $order_by
|
|
|
187 |
* @return type $results
|
188 |
*/
|
189 |
-
function get_user_albums
|
190 |
global $wpdb;
|
191 |
-
if ( is_multisite
|
192 |
-
|
|
|
193 |
|
194 |
$sql = "SELECT * FROM {$this->table_name} ";
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
199 |
AND media_type = 'album'
|
200 |
AND (context = 'profile' or context is NULL) ";
|
201 |
-
if( is_multisite() ){
|
202 |
-
|
203 |
}
|
204 |
-
$where
|
205 |
$qorder_by = " ORDER BY {$this->table_name}.$order_by ";
|
206 |
-
$sql .= $where . $qorder_by
|
207 |
-
if($offset
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
219 |
}
|
220 |
|
221 |
-
$results = $wpdb->get_results
|
|
|
222 |
return $results;
|
223 |
}
|
224 |
|
@@ -228,33 +253,45 @@ class RTMediaModel extends RTDBModel {
|
|
228 |
* @param type $offset
|
229 |
* @param type $per_page
|
230 |
* @param type $order_by
|
|
|
231 |
* @return type $results
|
232 |
*/
|
233 |
-
function get_group_albums
|
234 |
global $wpdb;
|
235 |
if ( is_multisite () )
|
236 |
$order_by = "blog_id" . (($order_by)? "," . $order_by :'');
|
237 |
-
$sql = "SELECT * FROM {$this->table_name} WHERE id IN(SELECT DISTINCT (album_id) FROM {$this->table_name} WHERE context_id = $group_id AND album_id IS NOT NULL AND media_type != 'album' AND context = 'group') OR (media_type = 'album' AND context_id = $group_id AND context = 'group')";
|
238 |
|
239 |
if( is_multisite() ){
|
240 |
-
|
|
|
|
|
241 |
}
|
242 |
-
$sql
|
243 |
-
|
244 |
-
if($offset !== false){
|
245 |
-
if( ! is_integer( $offset ) )
|
246 |
-
$offset = 0;
|
247 |
-
if( intval ( $offset ) < 0 )
|
248 |
-
$offset = 0;
|
249 |
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
|
255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
}
|
257 |
-
$results = $wpdb->get_results
|
|
|
258 |
return $results;
|
259 |
}
|
260 |
|
@@ -262,57 +299,61 @@ class RTMediaModel extends RTDBModel {
|
|
262 |
*
|
263 |
* @param type $user_id
|
264 |
* @param type $where_query
|
|
|
265 |
* @return type $result
|
266 |
*/
|
267 |
-
function get_counts
|
268 |
|
269 |
-
if ( ! $user_id && ! $where_query )
|
270 |
-
|
|
|
271 |
global $wpdb, $rtmedia;
|
272 |
|
273 |
-
$query =
|
274 |
-
"SELECT {$this->table_name}.privacy, ";
|
275 |
foreach ( $rtmedia->allowed_types as $type ) {
|
276 |
-
|
277 |
}
|
278 |
-
|
279 |
FROM
|
280 |
{$this->table_name} WHERE 2=2 ";
|
281 |
|
282 |
-
if ( is_multisite
|
283 |
-
|
284 |
}
|
285 |
|
286 |
if ( $where_query ){
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
//
|
303 |
-
//
|
304 |
-
//
|
305 |
-
//
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
-
|
313 |
-
$result = $wpdb->get_results ( $query );
|
314 |
-
if ( ! is_array ( $result ) )
|
315 |
-
return false;
|
316 |
return $result;
|
317 |
}
|
318 |
|
@@ -320,34 +361,37 @@ class RTMediaModel extends RTDBModel {
|
|
320 |
*
|
321 |
* @param type $profile_id
|
322 |
* @param type $context
|
|
|
323 |
* @return int
|
324 |
*/
|
325 |
-
function get_other_album_count
|
326 |
-
$global = RTMediaAlbum::get_globals
|
327 |
-
$sql
|
328 |
-
if ( is_multisite
|
329 |
-
|
330 |
}
|
331 |
-
if ( is_array
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
}
|
340 |
-
if (
|
341 |
-
|
342 |
-
} else
|
343 |
-
|
|
|
|
|
344 |
}
|
345 |
global $wpdb;
|
346 |
-
$result = $wpdb->get_results
|
347 |
-
if ( isset
|
348 |
-
|
349 |
} else {
|
350 |
-
|
351 |
}
|
352 |
}
|
353 |
|
7 |
*/
|
8 |
class RTMediaModel extends RTDBModel {
|
9 |
|
10 |
+
function __construct(){
|
11 |
+
parent::__construct( 'rtm_media', false, 10, true );
|
12 |
+
$this->meta_table_name = 'rt_rtm_media_meta';
|
13 |
}
|
14 |
|
15 |
/**
|
16 |
*
|
17 |
* @param type $name
|
18 |
* @param type $arguments
|
19 |
+
*
|
20 |
* @return type
|
21 |
*/
|
22 |
+
function __call( $name, $arguments ){
|
23 |
+
$result = parent::__call( $name, $arguments );
|
24 |
+
if ( ! $result['result'] ){
|
25 |
+
$result['result'] = $this->populate_results_fallback( $name, $arguments );
|
26 |
}
|
27 |
+
|
28 |
return $result;
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
*
|
33 |
* @global type $wpdb
|
34 |
+
*
|
35 |
+
* @param type $columns
|
36 |
+
* @param type $offset
|
37 |
+
* @param type $per_page
|
38 |
+
* @param type $order_by
|
39 |
+
*
|
40 |
* @return type
|
41 |
*/
|
42 |
+
function get( $columns, $offset = false, $per_page = false, $order_by = 'media_id desc', $count_flag = false ){
|
43 |
global $wpdb;
|
44 |
+
$select = 'SELECT ';
|
45 |
+
if ( $count_flag ){
|
46 |
+
$select .= 'count(*) ';
|
47 |
} else {
|
48 |
+
$select .= "{$this->table_name}.* ";
|
49 |
}
|
50 |
|
51 |
+
$from = " FROM {$this->table_name} ";
|
52 |
+
$join = '';
|
53 |
+
$where = ' where 2=2 ';
|
54 |
+
if ( is_multisite() ){
|
55 |
+
$where .= " AND {$this->table_name}.blog_id = '" . get_current_blog_id() . "' ";
|
56 |
}
|
57 |
$temp = 65;
|
58 |
foreach ( $columns as $colname => $colvalue ) {
|
59 |
+
if ( 'meta_query' == strtolower( $colname ) ){
|
60 |
foreach ( $colvalue as $meta_query ) {
|
61 |
+
if ( ! isset( $meta_query['compare'] ) ){
|
62 |
+
$meta_query['compare'] = '=';
|
63 |
}
|
64 |
+
$tbl_alias = chr( $temp ++ );
|
65 |
+
if ( is_multisite() ){
|
66 |
$join .= " LEFT JOIN {$wpdb->base_prefix}{$this->meta_table_name} as {$tbl_alias} ON {$this->table_name}.id = {$tbl_alias}.media_id ";
|
67 |
} else {
|
68 |
$join .= " LEFT JOIN {$wpdb->prefix}{$this->meta_table_name} as {$tbl_alias} ON {$this->table_name}.id = {$tbl_alias}.media_id ";
|
69 |
}
|
70 |
+
if ( isset( $meta_query['value'] ) ){
|
71 |
+
$where .= " AND ({$tbl_alias}.meta_key = '{$meta_query["key"]}' and {$tbl_alias}.meta_value {$meta_query["compare"]} '{$meta_query["value"]}' ) ";
|
72 |
} else {
|
73 |
+
$where .= " AND {$tbl_alias}.meta_key = '{$meta_query["key"]}' ";
|
74 |
}
|
75 |
}
|
76 |
+
} else {
|
77 |
+
if ( is_array( $colvalue ) ){
|
78 |
+
if ( ! isset( $colvalue['compare'] ) ){
|
79 |
$compare = 'IN';
|
80 |
+
} else {
|
81 |
+
$compare = $colvalue['compare'];
|
82 |
+
}
|
83 |
|
84 |
+
$tmpVal = isset( $colvalue['value'] ) ? $colvalue['value'] : $colvalue;
|
85 |
+
$col_val_comapare = ( is_array( $tmpVal ) ) ? '(\'' . implode( "','", $tmpVal ) . '\')' : '(\'' . $tmpVal . '\')';
|
86 |
+
if ( 'IS NOT' == $compare ){
|
87 |
+
$col_val_comapare = ! empty( $colvalue['value'] ) ? $colvalue['value'] : $col_val_comapare;
|
88 |
}
|
89 |
$where .= " AND {$this->table_name}.{$colname} {$compare} {$col_val_comapare}";
|
90 |
} else {
|
91 |
$where .= " AND {$this->table_name}.{$colname} = '{$colvalue}'";
|
92 |
}
|
93 |
+
}
|
94 |
}
|
95 |
+
$qgroup_by = ' ';
|
96 |
+
if ( $order_by ){
|
97 |
+
$qorder_by = " ORDER BY {$this->table_name}.{$order_by}";
|
98 |
} else {
|
99 |
+
$qorder_by = '';
|
100 |
}
|
101 |
|
102 |
+
$select = apply_filters( 'rtmedia-model-select-query', $select, $this->table_name );
|
103 |
+
$join = apply_filters( 'rtmedia-model-join-query', $join, $this->table_name );
|
104 |
+
$where = apply_filters( 'rtmedia-model-where-query', $where, $this->table_name, $join );
|
105 |
+
$qgroup_by = apply_filters( 'rtmedia-model-group-by-query', $qgroup_by, $this->table_name );
|
106 |
+
$qorder_by = apply_filters( 'rtmedia-model-order-by-query', $qorder_by, $this->table_name );
|
107 |
|
108 |
$sql = $select . $from . $join . $where . $qgroup_by . $qorder_by;
|
109 |
+
if ( false !== $offset ){
|
110 |
+
if ( ! is_integer( $offset ) ){
|
111 |
+
$offset = 0;
|
112 |
+
}
|
113 |
|
114 |
+
if ( intval( $offset ) < 0 ){
|
115 |
+
$offset = 0;
|
116 |
+
}
|
117 |
|
118 |
+
if ( ! is_integer( $per_page ) ){
|
119 |
+
$per_page = 1;
|
120 |
+
}
|
121 |
|
122 |
+
if ( intval( $per_page ) < 1 ){
|
123 |
+
$per_page = 1;
|
124 |
+
}
|
125 |
|
126 |
+
//filter added to change the LIMIT
|
127 |
+
$limit = apply_filters( 'rtmedia-model-limit-query', ' LIMIT ' . $offset . ',' . $per_page, $offset, $per_page );
|
128 |
|
129 |
+
$sql .= $limit;
|
130 |
+
}
|
131 |
+
if ( ! $count_flag ){
|
132 |
+
return $wpdb->get_results( $sql );
|
133 |
+
} else {
|
134 |
+
return $wpdb->get_var( $sql );
|
135 |
}
|
|
|
|
|
|
|
|
|
136 |
}
|
137 |
|
138 |
/**
|
139 |
*
|
140 |
* @param type $name
|
141 |
* @param type $arguments
|
142 |
+
*
|
143 |
* @return type
|
144 |
*/
|
145 |
+
function populate_results_fallback( $name, $arguments ){
|
146 |
+
$result['result'] = false;
|
147 |
+
if ( 'get_by_media_id' == $name && isset( $arguments[0] ) && $arguments[0] ){
|
148 |
+
|
149 |
+
$result['result'][0]->media_id = $arguments[0];
|
150 |
+
|
151 |
+
$post_type = get_post_field( 'post_type', $arguments[0] );
|
152 |
+
if ( 'attachment' == $post_type ){
|
153 |
+
$post_mime_type = explode( '/', get_post_field( 'post_mime_type', $arguments[0] ) );
|
154 |
+
$result['result'][0]->media_type = $post_mime_type[0];
|
155 |
+
} elseif ( 'bp_media_album' == $post_type ) {
|
156 |
+
$result['result'][0]->media_type = 'bp_media_album';
|
157 |
+
} else {
|
158 |
+
$result['result'][0]->media_type = false;
|
159 |
+
}
|
160 |
+
|
161 |
+
$result['result'][0]->context_id = intval( get_post_meta( $arguments[0], 'bp-media-key', true ) );
|
162 |
+
if ( $result['result'][0]->context_id > 0 ){
|
163 |
+
$result['result'][0]->context = 'profile';
|
164 |
+
} else {
|
165 |
+
$result['result'][0]->context = 'group';
|
166 |
+
}
|
167 |
+
|
168 |
+
$result['result'][0]->activity_id = get_post_meta( $arguments[0], 'bp_media_child_activity', true );
|
169 |
+
|
170 |
+
$result['result'][0]->privacy = get_post_meta( $arguments[0], 'bp_media_privacy', true );
|
171 |
}
|
172 |
+
|
173 |
+
return $result['result'];
|
174 |
}
|
175 |
|
176 |
/**
|
179 |
* @param type $offset
|
180 |
* @param type $per_page
|
181 |
* @param type $order_by
|
182 |
+
*
|
183 |
* @return type
|
184 |
*/
|
185 |
+
function get_media( $columns, $offset = false, $per_page = false, $order_by = 'media_id desc', $count_flag = false ){
|
186 |
+
if ( is_multisite() ){
|
187 |
+
$order_by = 'blog_id' . ( ( $order_by ) ? ',' . $order_by : '' );
|
188 |
}
|
189 |
|
190 |
+
$results = $this->get( $columns, $offset, $per_page, $order_by, $count_flag );
|
191 |
|
192 |
return $results;
|
193 |
}
|
198 |
* @param type $offset
|
199 |
* @param type $per_page
|
200 |
* @param type $order_by
|
201 |
+
*
|
202 |
* @return type $results
|
203 |
*/
|
204 |
+
function get_user_albums( $author_id, $offset, $per_page, $order_by = 'media_id desc' ){
|
205 |
global $wpdb;
|
206 |
+
if ( is_multisite() ){
|
207 |
+
$order_by = 'blog_id' . ( ( $order_by ) ? ',' . $order_by : '' );
|
208 |
+
}
|
209 |
|
210 |
$sql = "SELECT * FROM {$this->table_name} ";
|
211 |
+
|
212 |
+
if( is_multisite() ){
|
213 |
+
$sub_sql = "SELECT DISTINCT (album_id) FROM {$this->table_name} WHERE media_author = $author_id AND album_id IS NOT NULL AND media_type <> 'album' AND context <> 'group' AND blog_id = '".get_current_blog_id()."'";
|
214 |
+
} else {
|
215 |
+
$sub_sql = "SELECT DISTINCT (album_id) FROM {$this->table_name} WHERE media_author = $author_id AND album_id IS NOT NULL AND media_type <> 'album' AND context <> 'group'";
|
216 |
+
}
|
217 |
+
|
218 |
+
$where = " WHERE (id IN( $sub_sql ) OR (media_author = $author_id ))
|
219 |
AND media_type = 'album'
|
220 |
AND (context = 'profile' or context is NULL) ";
|
221 |
+
if ( is_multisite() ){
|
222 |
+
$where .= " AND {$this->table_name}.blog_id = '" . get_current_blog_id() . "' ";
|
223 |
}
|
224 |
+
$where = apply_filters( 'rtmedia-get-album-where-query', $where, $this->table_name );
|
225 |
$qorder_by = " ORDER BY {$this->table_name}.$order_by ";
|
226 |
+
$sql .= $where . $qorder_by;
|
227 |
+
if ( false !== $offset ){
|
228 |
+
if ( ! is_integer( $offset ) ){
|
229 |
+
$offset = 0;
|
230 |
+
}
|
231 |
+
if ( intval( $offset ) < 0 ){
|
232 |
+
$offset = 0;
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( ! is_integer( $per_page ) ){
|
236 |
+
$per_page = 1;
|
237 |
+
}
|
238 |
+
if ( intval( $per_page ) < 1 ){
|
239 |
+
$per_page = 1;
|
240 |
+
}
|
241 |
+
|
242 |
+
$sql .= ' LIMIT ' . $offset . ',' . $per_page;
|
243 |
}
|
244 |
|
245 |
+
$results = $wpdb->get_results( $sql );
|
246 |
+
|
247 |
return $results;
|
248 |
}
|
249 |
|
253 |
* @param type $offset
|
254 |
* @param type $per_page
|
255 |
* @param type $order_by
|
256 |
+
*
|
257 |
* @return type $results
|
258 |
*/
|
259 |
+
function get_group_albums( $group_id, $offset, $per_page, $order_by = 'media_id desc' ){
|
260 |
global $wpdb;
|
261 |
if ( is_multisite () )
|
262 |
$order_by = "blog_id" . (($order_by)? "," . $order_by :'');
|
|
|
263 |
|
264 |
if( is_multisite() ){
|
265 |
+
$sub_sql = "SELECT DISTINCT (album_id) FROM {$this->table_name} WHERE context_id = $group_id AND album_id IS NOT NULL AND media_type != 'album' AND context = 'group' AND blog_id = '".get_current_blog_id()."'";
|
266 |
+
} else {
|
267 |
+
$sub_sql = "SELECT DISTINCT (album_id) FROM {$this->table_name} WHERE context_id = $group_id AND album_id IS NOT NULL AND media_type != 'album' AND context = 'group'";
|
268 |
}
|
269 |
+
$sql = "SELECT * FROM {$this->table_name} WHERE id IN( $sub_sql ) OR (media_type = 'album' AND context_id = $group_id AND context = 'group')";
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
+
if ( is_multisite() ){
|
272 |
+
$sql .= " AND {$this->table_name}.blog_id = '" . get_current_blog_id() . "' ";
|
273 |
+
}
|
274 |
+
$sql .= " ORDER BY {$this->table_name}.$order_by";
|
275 |
|
276 |
+
if ( false !== $offset ){
|
277 |
+
if ( ! is_integer( $offset ) ){
|
278 |
+
$offset = 0;
|
279 |
+
}
|
280 |
+
if ( intval( $offset ) < 0 ){
|
281 |
+
$offset = 0;
|
282 |
+
}
|
283 |
+
|
284 |
+
if ( ! is_integer( $per_page ) ){
|
285 |
+
$per_page = 1;
|
286 |
+
}
|
287 |
+
if ( intval( $per_page ) < 1 ){
|
288 |
+
$per_page = 1;
|
289 |
+
}
|
290 |
+
|
291 |
+
$sql .= ' LIMIT ' . $offset . ',' . $per_page;
|
292 |
}
|
293 |
+
$results = $wpdb->get_results( $sql );
|
294 |
+
|
295 |
return $results;
|
296 |
}
|
297 |
|
299 |
*
|
300 |
* @param type $user_id
|
301 |
* @param type $where_query
|
302 |
+
*
|
303 |
* @return type $result
|
304 |
*/
|
305 |
+
function get_counts( $user_id = false, $where_query = false ){
|
306 |
|
307 |
+
if ( ! $user_id && ! $where_query ){
|
308 |
+
return false;
|
309 |
+
}
|
310 |
global $wpdb, $rtmedia;
|
311 |
|
312 |
+
$query = "SELECT {$this->table_name}.privacy, ";
|
|
|
313 |
foreach ( $rtmedia->allowed_types as $type ) {
|
314 |
+
$query .= "SUM(CASE WHEN {$this->table_name}.media_type LIKE '{$type['name']}' THEN 1 ELSE 0 END) as {$type['name']}, ";
|
315 |
}
|
316 |
+
$query .= "SUM(CASE WHEN {$this->table_name}.media_type LIKE 'album' THEN 1 ELSE 0 END) as album
|
317 |
FROM
|
318 |
{$this->table_name} WHERE 2=2 ";
|
319 |
|
320 |
+
if ( is_multisite() ){
|
321 |
+
$query .= " AND {$this->table_name}.blog_id = '" . get_current_blog_id() . "' ";
|
322 |
}
|
323 |
|
324 |
if ( $where_query ){
|
325 |
+
foreach ( $where_query as $colname => $colvalue ) {
|
326 |
+
if ( 'meta_query' != strtolower( $colname ) ){
|
327 |
+
if ( is_array( $colvalue ) ){
|
328 |
+
if ( ! isset( $colvalue['compare'] ) ){
|
329 |
+
$compare = 'IN';
|
330 |
+
} else {
|
331 |
+
$compare = $colvalue['compare'];
|
332 |
+
}
|
333 |
+
if ( ! isset( $colvalue['value'] ) ){
|
334 |
+
$colvalue['value'] = $colvalue;
|
335 |
+
}
|
336 |
+
|
337 |
+
$query .= " AND {$this->table_name}.{$colname} {$compare} ('" . implode( "','", $colvalue['value'] ) . "')";
|
338 |
+
} else {
|
339 |
+
|
340 |
+
// if ( $colname == "context" && $colvalue == "profile" ) {
|
341 |
+
// $query .= " AND {$this->table_name}.{$colname} <> 'group'";
|
342 |
+
// } else {
|
343 |
+
// $query .= " AND {$this->table_name}.{$colname} = '{$colvalue}'";
|
344 |
+
// }
|
345 |
+
//profile now shows only profile media so conditional check removed and counts will be fetched according to the available context
|
346 |
+
$query .= " AND {$this->table_name}.{$colname} = '{$colvalue}'";
|
347 |
+
}
|
348 |
+
}
|
349 |
+
}
|
350 |
+
}
|
351 |
+
$query .= 'GROUP BY privacy';
|
352 |
+
$result = $wpdb->get_results( $query );
|
353 |
+
if ( ! is_array( $result ) ){
|
354 |
+
return false;
|
355 |
}
|
356 |
+
|
|
|
|
|
|
|
357 |
return $result;
|
358 |
}
|
359 |
|
361 |
*
|
362 |
* @param type $profile_id
|
363 |
* @param type $context
|
364 |
+
*
|
365 |
* @return int
|
366 |
*/
|
367 |
+
function get_other_album_count( $profile_id, $context = 'profile' ){
|
368 |
+
$global = RTMediaAlbum::get_globals();
|
369 |
+
$sql = "select distinct album_id from {$this->table_name} where 2=2 AND context = '{$context}' ";
|
370 |
+
if ( is_multisite() ){
|
371 |
+
$sql .= " AND {$this->table_name}.blog_id = '" . get_current_blog_id() . "' ";
|
372 |
}
|
373 |
+
if ( is_array( $global ) && count( $global ) > 0 ){
|
374 |
+
$sql .= ' and album_id in (';
|
375 |
+
$sep = '';
|
376 |
+
foreach ( $global as $id ) {
|
377 |
+
$sql .= $sep . $id;
|
378 |
+
$sep = ',';
|
379 |
+
}
|
380 |
+
$sql .= ')';
|
381 |
}
|
382 |
+
if ( 'profile' == $context ){
|
383 |
+
$sql .= " AND media_author=$profile_id ";
|
384 |
+
} else {
|
385 |
+
if ( 'group' == $context ){
|
386 |
+
$sql .= " AND context_id=$profile_id ";
|
387 |
+
}
|
388 |
}
|
389 |
global $wpdb;
|
390 |
+
$result = $wpdb->get_results( $sql );
|
391 |
+
if ( isset( $result ) ){
|
392 |
+
return count( $result );
|
393 |
} else {
|
394 |
+
return 0;
|
395 |
}
|
396 |
}
|
397 |
|
app/helper/RTMediaSettings.php
CHANGED
@@ -6,9 +6,9 @@
|
|
6 |
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
7 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
8 |
*/
|
9 |
-
if ( ! class_exists( 'RTMediaSettings' ) )
|
10 |
|
11 |
-
|
12 |
|
13 |
/**
|
14 |
* Constructor
|
@@ -16,41 +16,39 @@ if ( ! class_exists( 'RTMediaSettings' ) ) {
|
|
16 |
* @access public
|
17 |
* @return void
|
18 |
*/
|
19 |
-
|
20 |
-
|
21 |
add_action( 'admin_init', array( $this, 'settings' ) );
|
22 |
if ( isset( $_POST['rtmedia-options-save'] ) ){
|
23 |
-
|
24 |
}
|
25 |
-
|
26 |
-
|
27 |
-
// add_action('network_admin_notices', array($this, 'privacy_notice'));
|
28 |
-
// } else {
|
29 |
-
// add_action('admin_notices', array($this, 'privacy_notice'));
|
30 |
-
// }
|
31 |
-
}
|
32 |
|
33 |
/**
|
34 |
* Get default options.
|
35 |
*
|
36 |
* @access public
|
37 |
* @global string 'rtmedia'
|
|
|
38 |
* @param void
|
|
|
39 |
* @return array $defaults
|
40 |
*/
|
41 |
-
public function get_default_options()
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
54 |
'general_uniqueviewcount' => 0,
|
55 |
'general_viewcount' => 0,
|
56 |
'general_AllowUserData' => 1,
|
@@ -58,308 +56,315 @@ if ( ! class_exists( 'RTMediaSettings' ) ) {
|
|
58 |
'rtmedia_affiliate_id' => '',
|
59 |
'rtmedia_enable_api' => 0,
|
60 |
'general_masonry_layout' => 0,
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
return $defaults;
|
97 |
}
|
98 |
|
99 |
-
|
100 |
* Register Settings.
|
101 |
*
|
102 |
* @access public
|
|
|
103 |
* @param type $options
|
|
|
104 |
* @return type $options
|
105 |
*/
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
111 |
|
112 |
/**
|
113 |
* Sanitize before saving the options.
|
114 |
*
|
115 |
* @access public
|
|
|
116 |
* @param type $options
|
|
|
117 |
* @return type $options
|
118 |
*/
|
119 |
-
public function sanitize_before_save_options( $options )
|
120 |
-
|
121 |
-
|
122 |
-
if( ! isset( $options[$key] ) ){
|
123 |
-
|
124 |
}
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
*
|
132 |
-
* @access public
|
133 |
-
* @param void
|
134 |
-
* @return void
|
135 |
-
*/
|
136 |
-
public function add_max_video_thumb_notice(){
|
137 |
-
echo '<div class="error"><p>' . __( 'Max Video thumbnail size is ', 'rtmedia' ) .' <strong>10</strong></p></div>';
|
138 |
-
}
|
139 |
|
140 |
-
|
141 |
* rtmedia settings.
|
142 |
*
|
143 |
* @access public
|
144 |
* @global BPMediaAddon $rtmedia_addon
|
145 |
-
*
|
|
|
|
|
146 |
* @return void
|
147 |
*/
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
$is_rewrite_rule_flush = apply_filters( 'rtmedia_flush_rewrite_rule', false );
|
159 |
-
|
160 |
-
do_action
|
161 |
-
if( $is_rewrite_rule_flush ){
|
162 |
-
|
163 |
}
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
|
169 |
-
|
170 |
$rtmedia_addon = new RTMediaAddon();
|
171 |
add_settings_section( 'rtm-addons', __( 'BuddyPress Media Addons for Photos', 'rtmedia' ), array( $rtmedia_addon, 'get_addons' ), 'rtmedia-addons' );
|
172 |
$rtmedia_support = new RTMediaSupport( false );
|
173 |
add_settings_section( 'rtm-support', __( 'Support', 'rtmedia' ), array( $rtmedia_support, 'get_support_content' ), 'rtmedia-support' );
|
174 |
$rtmedia_themes = new RTMediaThemes();
|
175 |
add_settings_section( 'rtm-themes', __( 'rtMedia Themes', 'rtmedia' ), array( $rtmedia_themes, 'get_themes' ), 'rtmedia-themes' );
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
|
180 |
-
// if (!BPMediaPrivacy::is_installed()) {
|
181 |
-
// $rtmedia_privacy = new BPMediaPrivacySettings();
|
182 |
-
// add_filter('rtmedia_add_sub_tabs', array($rtmedia_privacy, 'ui'), 99, 2);
|
183 |
-
// add_settings_section('rtm-privacy', __('Update Database', 'rtmedia'), array($rtmedia_privacy, 'init'), 'rtmedia-privacy');
|
184 |
-
// }
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
$rtmedia_save_setting_single = true;
|
190 |
-
|
191 |
-
|
192 |
|
193 |
/**
|
194 |
* Show network notices.
|
195 |
*
|
196 |
* @access public
|
|
|
197 |
* @param void
|
|
|
198 |
* @return void
|
199 |
*/
|
200 |
-
public function network_notices()
|
201 |
$flag = 1;
|
202 |
if ( rtmedia_get_site_option( 'rtm-media-enable', false ) ){
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
}
|
207 |
if ( rtmedia_get_site_option( 'rtm-media-type', false ) ){
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
}
|
212 |
if ( rtmedia_get_site_option( 'rtm-media-default-count', false ) ){
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
}
|
217 |
|
218 |
if ( rtmedia_get_site_option( 'rtm-recount-success', false ) ){
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
} elseif ( rtmedia_get_site_option( 'rtm-recount-fail', false ) ){
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
}
|
227 |
|
228 |
if ( get_site_option( 'rtm-settings-saved' ) && $flag ){
|
229 |
-
|
230 |
}
|
231 |
|
232 |
delete_site_option( 'rtm-settings-saved' );
|
233 |
}
|
234 |
|
235 |
-
|
236 |
* Show allowed types.
|
237 |
*
|
238 |
* @access public
|
|
|
239 |
* @param void
|
|
|
240 |
* @return void
|
241 |
*/
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
*
|
252 |
* @access public
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
|
|
|
|
263 |
} else {
|
264 |
-
|
265 |
}
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
} else {
|
270 |
-
|
271 |
}
|
272 |
-
|
273 |
-
|
274 |
-
// if (!isset($_POST['rtmedia_options']['enable_on_profile']) && !isset($_POST['rtmedia_options']['enable_on_group'])) {
|
275 |
-
// if (is_multisite())
|
276 |
-
// update_site_option('rtm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', 'rtmedia'));
|
277 |
-
// else
|
278 |
-
// add_settings_error(__('Enable BuddyPress Media', 'rtmedia'), 'rtm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', 'rtmedia'));
|
279 |
-
// $input['enable_on_profile'] = 1;
|
280 |
-
// }
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
} else {
|
285 |
-
|
286 |
}
|
287 |
-
|
288 |
-
|
289 |
|
290 |
-
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
} else {
|
296 |
-
|
297 |
}
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
|
|
310 |
* @access public
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
|
|
|
|
329 |
* @access public
|
330 |
-
|
|
|
|
|
331 |
* @return string $notice
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
// if (BPMediaPrivacy::is_installed())
|
336 |
-
// return;
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
$notice = '
|
342 |
<div class="error">
|
343 |
-
<p>' . __( 'BuddyPress Media 2.6 requires a database upgrade. ', 'rtmedia' )
|
344 |
-
. '<a href="' . $url . '">' . __( 'Update Database', 'rtmedia' ) . '.</a></p>
|
345 |
</div>
|
346 |
';
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
* @access public
|
355 |
-
|
|
|
|
|
356 |
* @return void
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
|
363 |
-
|
364 |
|
365 |
}
|
6 |
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
7 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
8 |
*/
|
9 |
+
if ( ! class_exists( 'RTMediaSettings' ) ){
|
10 |
|
11 |
+
class RTMediaSettings {
|
12 |
|
13 |
/**
|
14 |
* Constructor
|
16 |
* @access public
|
17 |
* @return void
|
18 |
*/
|
19 |
+
public function __construct(){
|
20 |
+
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ){
|
21 |
add_action( 'admin_init', array( $this, 'settings' ) );
|
22 |
if ( isset( $_POST['rtmedia-options-save'] ) ){
|
23 |
+
add_action( 'init', array( $this, 'settings' ) );
|
24 |
}
|
25 |
+
}
|
26 |
+
}
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
/**
|
29 |
* Get default options.
|
30 |
*
|
31 |
* @access public
|
32 |
* @global string 'rtmedia'
|
33 |
+
*
|
34 |
* @param void
|
35 |
+
*
|
36 |
* @return array $defaults
|
37 |
*/
|
38 |
+
public function get_default_options(){
|
39 |
+
global $rtmedia;
|
40 |
+
$options = $rtmedia->options;
|
41 |
+
|
42 |
+
$defaults = array(
|
43 |
+
'general_enableAlbums' => 0,
|
44 |
+
'general_enableComments' => 0,
|
45 |
+
'general_downloadButton' => 0,
|
46 |
+
'general_enableLightbox' => 0,
|
47 |
+
'general_perPageMedia' => 10,
|
48 |
+
'general_display_media' => 'load_more',
|
49 |
+
'general_enableMediaEndPoint' => 0,
|
50 |
+
'general_showAdminMenu' => 0,
|
51 |
+
'general_videothumbs' => 2,
|
52 |
'general_uniqueviewcount' => 0,
|
53 |
'general_viewcount' => 0,
|
54 |
'general_AllowUserData' => 1,
|
56 |
'rtmedia_affiliate_id' => '',
|
57 |
'rtmedia_enable_api' => 0,
|
58 |
'general_masonry_layout' => 0,
|
59 |
+
);
|
60 |
+
|
61 |
+
$defaults = apply_filters( 'rtmedia_general_content_default_values', $defaults );
|
62 |
+
foreach ( $rtmedia->allowed_types as $type ) {
|
63 |
+
// invalid keys handled in sanitize method
|
64 |
+
$defaults[ 'allowedTypes_' . $type['name'] . '_enabled' ] = 0;
|
65 |
+
$defaults[ 'allowedTypes_' . $type['name'] . '_featured' ] = 0;
|
66 |
+
}
|
67 |
+
|
68 |
+
/* Previous Sizes values from buddypress is migrated */
|
69 |
+
foreach ( $rtmedia->default_sizes as $type => $typeValue ) {
|
70 |
+
foreach ( $typeValue as $size => $sizeValue ) {
|
71 |
+
foreach ( $sizeValue as $dimension => $value ) {
|
72 |
+
$defaults[ 'defaultSizes_' . $type . '_' . $size . '_' . $dimension ] = 0;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/* Privacy */
|
78 |
+
$defaults['privacy_enabled'] = 0;
|
79 |
+
$defaults['privacy_default'] = 0;
|
80 |
+
$defaults['privacy_userOverride'] = 0;
|
81 |
+
|
82 |
+
$defaults['buddypress_enableOnGroup'] = 0;
|
83 |
+
$defaults['buddypress_enableOnActivity'] = 0;
|
84 |
+
$defaults['buddypress_enableOnProfile'] = 0;
|
85 |
+
$defaults['buddypress_limitOnActivity'] = 0;
|
86 |
+
$defaults['styles_custom'] = '';
|
87 |
+
$defaults['styles_enabled'] = 1;
|
88 |
+
|
89 |
+
if ( isset( $options['general_videothumbs'] ) && is_numeric( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ){
|
90 |
+
$defaults['general_videothumbs'] = 10;
|
91 |
+
}
|
92 |
+
|
93 |
+
return $defaults;
|
|
|
94 |
}
|
95 |
|
96 |
+
/**
|
97 |
* Register Settings.
|
98 |
*
|
99 |
* @access public
|
100 |
+
*
|
101 |
* @param type $options
|
102 |
+
*
|
103 |
* @return type $options
|
104 |
*/
|
105 |
+
public function sanitize_options( $options ){
|
106 |
+
$defaults = $this->get_default_options();
|
107 |
+
$options = wp_parse_args( $options, $defaults );
|
108 |
+
|
109 |
+
return $options;
|
110 |
+
}
|
111 |
|
112 |
/**
|
113 |
* Sanitize before saving the options.
|
114 |
*
|
115 |
* @access public
|
116 |
+
*
|
117 |
* @param type $options
|
118 |
+
*
|
119 |
* @return type $options
|
120 |
*/
|
121 |
+
public function sanitize_before_save_options( $options ){
|
122 |
+
$defaults = $this->get_default_options();
|
123 |
+
foreach ( $defaults as $key => $value ) {
|
124 |
+
if ( ! isset( $options[ $key ] ) ){
|
125 |
+
$options[ $key ] = '0';
|
126 |
}
|
127 |
+
}
|
128 |
+
if ( isset( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ){
|
129 |
+
$options['general_videothumbs'] = 10;
|
130 |
+
}
|
131 |
|
132 |
+
return $options;
|
133 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
+
/**
|
136 |
* rtmedia settings.
|
137 |
*
|
138 |
* @access public
|
139 |
* @global BPMediaAddon $rtmedia_addon
|
140 |
+
*
|
141 |
+
* @param void
|
142 |
+
*
|
143 |
* @return void
|
144 |
*/
|
145 |
+
public function settings(){
|
146 |
+
global $rtmedia, $rtmedia_addon, $rtmedia_save_setting_single;
|
147 |
+
$options = rtmedia_get_site_option( 'rtmedia-options' );
|
148 |
+
$options = $this->sanitize_options( $options );
|
149 |
+
$rtmedia->options = $options;
|
150 |
+
// Save Settings first then proceed.
|
151 |
+
if ( isset( $_POST['rtmedia-options-save'] ) ){
|
152 |
+
$options = $_POST['rtmedia-options'];
|
153 |
+
$options = $this->sanitize_before_save_options( $options );
|
154 |
+
$options = apply_filters( 'rtmedia_pro_options_save_settings', $options );
|
155 |
$is_rewrite_rule_flush = apply_filters( 'rtmedia_flush_rewrite_rule', false );
|
156 |
+
rtmedia_update_site_option( 'rtmedia-options', $options );
|
157 |
+
do_action( 'rtmedia_save_admin_settings', $options );
|
158 |
+
if ( $is_rewrite_rule_flush ){
|
159 |
+
flush_rewrite_rules( false );
|
160 |
}
|
161 |
+
wp_redirect( $_SERVER['HTTP_REFERER'] );
|
162 |
+
global $rtmedia;
|
163 |
+
$rtmedia->options = $options;
|
164 |
+
}
|
165 |
|
166 |
+
if ( function_exists( 'add_settings_section' ) ){
|
167 |
$rtmedia_addon = new RTMediaAddon();
|
168 |
add_settings_section( 'rtm-addons', __( 'BuddyPress Media Addons for Photos', 'rtmedia' ), array( $rtmedia_addon, 'get_addons' ), 'rtmedia-addons' );
|
169 |
$rtmedia_support = new RTMediaSupport( false );
|
170 |
add_settings_section( 'rtm-support', __( 'Support', 'rtmedia' ), array( $rtmedia_support, 'get_support_content' ), 'rtmedia-support' );
|
171 |
$rtmedia_themes = new RTMediaThemes();
|
172 |
add_settings_section( 'rtm-themes', __( 'rtMedia Themes', 'rtmedia' ), array( $rtmedia_themes, 'get_themes' ), 'rtmedia-themes' );
|
173 |
+
}
|
|
|
|
|
174 |
|
175 |
+
// if (!BPMediaPrivacy::is_installed()) {
|
176 |
+
// $rtmedia_privacy = new BPMediaPrivacySettings();
|
177 |
+
// add_filter('rtmedia_add_sub_tabs', array($rtmedia_privacy, 'ui'), 99, 2);
|
178 |
+
// add_settings_section('rtm-privacy', __('Update Database', 'rtmedia'), array($rtmedia_privacy, 'init'), 'rtmedia-privacy');
|
179 |
+
// }
|
180 |
+
//$rtmedia_album_importer = new BPMediaAlbumimporter();
|
181 |
+
//add_settings_section('rtm-rt-album-importer', __('BP-Album Importer', 'rtmedia'), array($rtmedia_album_importer, 'ui'), 'rtmedia-importer');
|
182 |
+
//register_setting('rtmedia', 'rtmedia_options', array($this, 'sanitize'));
|
183 |
+
if ( ! isset( $rtmedia_save_setting_single ) ){
|
184 |
$rtmedia_save_setting_single = true;
|
185 |
+
}
|
186 |
+
}
|
187 |
|
188 |
/**
|
189 |
* Show network notices.
|
190 |
*
|
191 |
* @access public
|
192 |
+
*
|
193 |
* @param void
|
194 |
+
*
|
195 |
* @return void
|
196 |
*/
|
197 |
+
public function network_notices(){
|
198 |
$flag = 1;
|
199 |
if ( rtmedia_get_site_option( 'rtm-media-enable', false ) ){
|
200 |
+
echo '<div id="setting-error-bpm-media-enable" class="error"><p><strong>' . rtmedia_get_site_option( 'rtm-media-enable' ) . '</strong></p></div>';
|
201 |
+
delete_site_option( 'rtm-media-enable' );
|
202 |
+
$flag = 0;
|
203 |
}
|
204 |
if ( rtmedia_get_site_option( 'rtm-media-type', false ) ){
|
205 |
+
echo '<div id="setting-error-bpm-media-type" class="error"><p><strong>' . rtmedia_get_site_option( 'rtm-media-type' ) . '</strong></p></div>';
|
206 |
+
delete_site_option( 'rtm-media-type' );
|
207 |
+
$flag = 0;
|
208 |
}
|
209 |
if ( rtmedia_get_site_option( 'rtm-media-default-count', false ) ){
|
210 |
+
echo '<div id="setting-error-bpm-media-default-count" class="error"><p><strong>' . rtmedia_get_site_option( 'rtm-media-default-count' ) . '</strong></p></div>';
|
211 |
+
delete_site_option( 'rtm-media-default-count' );
|
212 |
+
$flag = 0;
|
213 |
}
|
214 |
|
215 |
if ( rtmedia_get_site_option( 'rtm-recount-success', false ) ){
|
216 |
+
echo '<div id="setting-error-bpm-recount-success" class="updated"><p><strong>' . rtmedia_get_site_option( 'rtm-recount-success' ) . '</strong></p></div>';
|
217 |
+
delete_site_option( 'rtm-recount-success' );
|
218 |
+
$flag = 0;
|
219 |
+
} elseif ( rtmedia_get_site_option( 'rtm-recount-fail', false ) ) {
|
220 |
+
echo '<div id="setting-error-bpm-recount-fail" class="error"><p><strong>' . rtmedia_get_site_option( 'rtm-recount-fail' ) . '</strong></p></div>';
|
221 |
+
delete_site_option( 'rtm-recount-fail' );
|
222 |
+
$flag = 0;
|
223 |
}
|
224 |
|
225 |
if ( get_site_option( 'rtm-settings-saved' ) && $flag ){
|
226 |
+
echo '<div id="setting-error-bpm-settings-saved" class="updated"><p><strong>' . get_site_option( 'rtm-settings-saved' ) . '</strong></p></div>';
|
227 |
}
|
228 |
|
229 |
delete_site_option( 'rtm-settings-saved' );
|
230 |
}
|
231 |
|
232 |
+
/**
|
233 |
* Show allowed types.
|
234 |
*
|
235 |
* @access public
|
236 |
+
*
|
237 |
* @param void
|
238 |
+
*
|
239 |
* @return void
|
240 |
*/
|
241 |
+
public function allowed_types(){
|
242 |
+
$allowed_types = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
243 |
+
$allowed_types = explode( ' ', $allowed_types );
|
244 |
+
$allowed_types = implode( ', ', $allowed_types );
|
245 |
+
echo '<span class="description">' . sprintf( __( 'Currently your network allows uploading of the following file types. You can change the settings <a href="%s">here</a>.<br /><code>%s</code></span>', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ), $allowed_types );
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Sanitizes the settings
|
250 |
*
|
251 |
* @access public
|
252 |
+
* @global type $rtmedia_admin
|
253 |
+
*
|
254 |
+
* @param type $input
|
255 |
+
*
|
256 |
+
* @return type $input
|
257 |
+
*/
|
258 |
+
public function sanitize( $input ){
|
259 |
+
global $rtmedia_admin;
|
260 |
+
if ( isset( $_POST['refresh-count'] ) ){
|
261 |
+
if ( $rtmedia_admin->update_count() ){
|
262 |
+
if ( is_multisite() ){
|
263 |
+
rtmedia_update_site_option( 'rtm-recount-success', __( 'Recounting of media files done successfully', 'rtmedia' ) );
|
264 |
} else {
|
265 |
+
add_settings_error( __( 'Recount Success', 'rtmedia' ), 'rtm-recount-success', __( 'Recounting of media files done successfully', 'rtmedia' ), 'updated' );
|
266 |
}
|
267 |
+
} else {
|
268 |
+
if ( is_multisite() ){
|
269 |
+
rtmedia_update_site_option( 'rtm-recount-fail', __( 'Recounting Failed', 'rtmedia' ) );
|
270 |
} else {
|
271 |
+
add_settings_error( __( 'Recount Fail', 'rtmedia' ), 'rtm-recount-fail', __( 'Recounting Failed', 'rtmedia' ) );
|
272 |
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
// if (!isset($_POST['rtmedia_options']['enable_on_profile']) && !isset($_POST['rtmedia_options']['enable_on_group'])) {
|
276 |
+
// if (is_multisite())
|
277 |
+
// update_site_option('rtm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', 'rtmedia'));
|
278 |
+
// else
|
279 |
+
// add_settings_error(__('Enable BuddyPress Media', 'rtmedia'), 'rtm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', 'rtmedia'));
|
280 |
+
// $input['enable_on_profile'] = 1;
|
281 |
+
// }
|
282 |
+
if ( ! isset( $_POST['rtmedia_options']['videos_enabled'] ) && ! isset( $_POST['rtmedia_options']['audio_enabled'] ) && ! isset( $_POST['rtmedia_options']['images_enabled'] ) ){
|
283 |
+
if ( is_multisite() ){
|
284 |
+
rtmedia_update_site_option( 'rtm-media-type', __( 'Atleast one Media Type Must be selected', 'rtmedia' ) );
|
285 |
} else {
|
286 |
+
add_settings_error( __( 'Media Type', 'rtmedia' ), 'rtm-media-type', __( 'Atleast one Media Type Must be selected', 'rtmedia' ) );
|
287 |
}
|
288 |
+
$input['images_enabled'] = 1;
|
289 |
+
}
|
290 |
|
291 |
+
$input['default_count'] = intval( $_POST['rtmedia_options']['default_count'] );
|
292 |
|
293 |
+
if ( ! is_int( $input['default_count'] ) || ( $input['default_count'] < 0 ) || empty( $input['default_count'] ) ){
|
294 |
+
if ( is_multisite() ){
|
295 |
+
rtmedia_update_site_option( 'rtm-media-default-count', __( '"Number of media" count value should be numeric and greater than 0.', 'rtmedia' ) );
|
296 |
} else {
|
297 |
+
add_settings_error( __( 'Default Count', 'rtmedia' ), 'rtm-media-default-count', __( '"Number of media" count value should be numeric and greater than 0.', 'rtmedia' ) );
|
298 |
}
|
299 |
+
$input['default_count'] = 10;
|
300 |
+
}
|
301 |
+
if ( is_multisite() ){
|
302 |
+
rtmedia_update_site_option( 'rtm-settings-saved', __( 'Settings saved.', 'rtmedia' ) );
|
303 |
+
}
|
304 |
+
do_action( 'rtmedia_sanitize_settings', $_POST, $input );
|
305 |
+
|
306 |
+
return $input;
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Show image settings intro.
|
311 |
+
*
|
312 |
* @access public
|
313 |
+
*
|
314 |
+
* @param void
|
315 |
+
*
|
316 |
+
* @return void
|
317 |
+
*/
|
318 |
+
public function image_settings_intro(){
|
319 |
+
if ( is_plugin_active( 'regenerate-thumbnails/regenerate-thumbnails.php' ) ){
|
320 |
+
$regenerate_link = admin_url( '/tools.php?page=regenerate-thumbnails' );
|
321 |
+
} elseif ( array_key_exists( 'regenerate-thumbnails/regenerate-thumbnails.php', get_plugins() ) ) {
|
322 |
+
$regenerate_link = admin_url( '/plugins.php#regenerate-thumbnails' );
|
323 |
+
} else {
|
324 |
+
$regenerate_link = wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=regenerate-thumbnails' ), 'install-plugin_regenerate-thumbnails' );
|
325 |
+
}
|
326 |
+
echo '<span class="description">' . sprintf( __( 'If you make changes to width, height or crop settings, you must use "<a href="%s">Regenerate Thumbnail Plugin</a>" to regenerate old images."', 'rtmedia' ), $regenerate_link ) . '</span>';
|
327 |
+
echo '<div class="clearfix"> </div>';
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Output a checkbox for privacy_notice.
|
332 |
+
*
|
333 |
* @access public
|
334 |
+
*
|
335 |
+
* @param void
|
336 |
+
*
|
337 |
* @return string $notice
|
338 |
+
*/
|
339 |
+
public function privacy_notice(){
|
340 |
+
if ( current_user_can( 'create_users' ) ){
|
341 |
+
// if (BPMediaPrivacy::is_installed())
|
342 |
+
// return;
|
343 |
+
$url = add_query_arg( array( 'page' => 'rtmedia-privacy' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) );
|
344 |
+
|
345 |
+
$notice = '
|
|
|
|
|
346 |
<div class="error">
|
347 |
+
<p>' . __( 'BuddyPress Media 2.6 requires a database upgrade. ', 'rtmedia' ) . '<a href="' . $url . '">' . __( 'Update Database', 'rtmedia' ) . '.</a></p>
|
|
|
348 |
</div>
|
349 |
';
|
350 |
+
echo $notice;
|
351 |
+
}
|
352 |
+
}
|
353 |
|
354 |
+
/**
|
355 |
+
* Output rtmedia_support_intro.
|
356 |
+
*
|
357 |
* @access public
|
358 |
+
*
|
359 |
+
* @param void
|
360 |
+
*
|
361 |
* @return void
|
362 |
+
*/
|
363 |
+
public function rtmedia_support_intro(){
|
364 |
+
echo '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://rtcamp.com/groups/buddypress-media/forum/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
|
365 |
+
echo '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/buddypress-media/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
|
366 |
+
}
|
367 |
|
368 |
+
}
|
369 |
|
370 |
}
|
app/helper/RTMediaSupport.php
CHANGED
@@ -16,97 +16,100 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
16 |
* Constructor
|
17 |
*
|
18 |
* @access public
|
|
|
19 |
* @param bool $init
|
|
|
20 |
* @return void
|
21 |
*/
|
22 |
-
public function __construct( $init = true )
|
23 |
|
24 |
if ( ! is_admin() ){
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
-
$this->curr_sub_tab =
|
29 |
-
if ( isset( $_REQUEST[
|
30 |
-
$this->curr_sub_tab = $_REQUEST[
|
31 |
}
|
32 |
-
// if($init) {
|
33 |
-
// $this->debug_info();
|
34 |
-
// if($this->curr_sub_tab == "debug") {
|
35 |
-
// add_action('rtmedia_admin_page_insert', array($this, 'debug_info_html'), 20);
|
36 |
-
// }
|
37 |
-
// if($this->curr_sub_tab == "migration") {
|
38 |
-
// add_action('rtmedia_admin_page_insert', array($this, 'migration_html'), 20);
|
39 |
-
// }
|
40 |
-
// }
|
41 |
-
//add_action('admin_init', array($this,'load_service_form'),99);
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
* Get support content.
|
46 |
*
|
47 |
* @access public
|
|
|
48 |
* @param void
|
|
|
49 |
* @return void
|
50 |
*/
|
51 |
-
public function get_support_content()
|
52 |
$tabs = array();
|
53 |
global $rtmedia_admin;
|
54 |
-
$tabs[
|
55 |
-
'title' => __( 'Premium Support', 'rtmedia' ),
|
|
|
|
|
|
|
56 |
);
|
57 |
-
$tabs[
|
58 |
-
'title' => __( 'Debug Info', 'rtmedia' ),
|
|
|
|
|
|
|
59 |
);
|
60 |
if ( $this->is_migration_required() ){ //if any un-migrated media is there
|
61 |
-
$tabs[
|
62 |
-
'title' => __( 'Migration', 'rtmedia' ),
|
|
|
|
|
|
|
63 |
);
|
64 |
}
|
65 |
?>
|
66 |
<div id="rtm-support">
|
67 |
<div class="horizontal-tabs">
|
68 |
<dl class='tabs' data-tab>
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
</dl>
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
</div>
|
111 |
</div>
|
112 |
<?php
|
@@ -117,28 +120,30 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
117 |
* Render support.
|
118 |
*
|
119 |
* @access public
|
|
|
120 |
* @param type $page
|
|
|
121 |
* @return void
|
122 |
*/
|
123 |
-
public function render_support( $page = '' )
|
124 |
global $wp_settings_sections, $wp_settings_fields;
|
125 |
|
126 |
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
127 |
return;
|
128 |
}
|
129 |
|
130 |
-
foreach ( (array)$wp_settings_sections[ $page ] as $section ) {
|
131 |
|
132 |
-
if ( $section[
|
133 |
-
call_user_func( $section[
|
134 |
}
|
135 |
|
136 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section[
|
137 |
continue;
|
138 |
}
|
139 |
|
140 |
echo '<table class="form-table">';
|
141 |
-
do_settings_fields( $page, $section[
|
142 |
echo '</table>';
|
143 |
}
|
144 |
}
|
@@ -147,10 +152,12 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
147 |
* Define Service Selector.
|
148 |
*
|
149 |
* @access public
|
|
|
150 |
* @param void
|
|
|
151 |
* @return void
|
152 |
*/
|
153 |
-
public function service_selector()
|
154 |
?>
|
155 |
<div>
|
156 |
<form name="rtmedia_service_select_form" method="post">
|
@@ -158,103 +165,57 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
158 |
<label class="bp-media-label" for="select_support"><?php _e( 'Service', 'rtmedia' ); ?>:</label>
|
159 |
<select name="rtmedia_service_select">
|
160 |
<option
|
161 |
-
value="premium_support" <?php if ( $_POST[
|
162 |
-
echo
|
163 |
} ?>><?php _e( 'Premium Support', 'rtmedia' ); ?></option>
|
164 |
<option
|
165 |
-
value="bug_report" <?php if ( $_POST[
|
166 |
-
echo
|
167 |
} ?>><?php _e( 'Bug Report', 'rtmedia' ); ?></option>
|
168 |
<option
|
169 |
-
value="new_feature" <?php if ( $_POST[
|
170 |
-
echo
|
171 |
} ?>><?php _e( 'New Feature', 'rtmedia' ); ?></option>
|
172 |
</select>
|
173 |
-
<input name="support_submit" value="<?php esc_attr_e( 'Submit', 'rtmedia' ); ?>" type="submit"
|
174 |
-
class="button"/>
|
175 |
</p>
|
176 |
</form>
|
177 |
</div>
|
178 |
<?php
|
179 |
-
//$this->get_form("premium_support");
|
180 |
}
|
181 |
|
182 |
-
// public function get_current_sub_tab() {
|
183 |
-
// return isset ( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : "support";
|
184 |
-
// }
|
185 |
-
|
186 |
-
// public function rtmedia_support_sub_tabs ( $active_tab = '' ) {
|
187 |
-
// // Declare local variables
|
188 |
-
// $tabs_html = '';
|
189 |
-
// $idle_class = 'nav-tab';
|
190 |
-
// $active_class = 'nav-tab nav-tab-active';
|
191 |
-
//
|
192 |
-
// // Setup core admin tabs
|
193 |
-
// $tabs = array(
|
194 |
-
// array(
|
195 |
-
// 'href' => get_admin_url ( null, add_query_arg ( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ) . "&tab=support",
|
196 |
-
// 'name' => __ ( 'Premium Support', 'rtmedia' ),
|
197 |
-
// 'slug' => 'rtmedia-support&tab=support'
|
198 |
-
// ),
|
199 |
-
// array(
|
200 |
-
// 'href' => get_admin_url ( null, add_query_arg ( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ) . "&tab=debug",
|
201 |
-
// 'name' => __ ( 'Debug Info', 'rtmedia' ),
|
202 |
-
// 'slug' => 'rtmedia-support&tab=debug'
|
203 |
-
// ),
|
204 |
-
// array(
|
205 |
-
// 'href' => get_admin_url ( null, add_query_arg ( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ) . "&tab=migration",
|
206 |
-
// 'name' => __ ( 'Migration', 'rtmedia' ),
|
207 |
-
// 'slug' => 'rtmedia-support&tab=migration'
|
208 |
-
// )
|
209 |
-
// );
|
210 |
-
// $tabs = apply_filters ( 'rtmedia_support_add_sub_tabs', $tabs );
|
211 |
-
// // Loop through tabs and build navigation
|
212 |
-
// $tabs_html = "";
|
213 |
-
// foreach ( array_values ( $tabs ) as $tab_data ) {
|
214 |
-
// $is_current = (bool) ( $tab_data[ 'slug' ] == (RTMediaAdmin::get_current_tab()."&tab=".$this->get_current_sub_tab () ) );
|
215 |
-
// $tab_class = $is_current ? $active_class : $idle_class;
|
216 |
-
// $tabs_html .= '<a href="' . $tab_data[ 'href' ] . '" class="' . $tab_class . '">' . $tab_data[ 'name' ] . '</a>';
|
217 |
-
// }
|
218 |
-
// // Output the tabs
|
219 |
-
// return $tabs_html;
|
220 |
-
//
|
221 |
-
//// // Do other fun things
|
222 |
-
//// do_action('bp_media_admin_tabs');
|
223 |
-
// }
|
224 |
|
225 |
/**
|
226 |
* Call rtmedia admin support form.
|
227 |
*
|
228 |
* @access public
|
|
|
229 |
* @param void
|
|
|
230 |
* @return void
|
231 |
*/
|
232 |
-
public function call_get_form()
|
233 |
-
if ( isset( $_REQUEST[
|
234 |
//echo "<h2 class='nav-tab-wrapper'>".$this->rtmedia_support_sub_tabs()."</h2>";
|
235 |
-
if ( $this->curr_sub_tab
|
236 |
echo "<div id='rtmedia_service_contact_container'><form name='rtmedia_service_contact_detail' method='post'>";
|
237 |
-
$this->get_form(
|
238 |
-
echo
|
239 |
}
|
240 |
}
|
241 |
}
|
242 |
|
243 |
-
// public function load_service_form() {
|
244 |
-
// if(isset($_REQUEST['page']) && $_REQUEST['page'] == 'rtmedia-support') {
|
245 |
-
// add_action('rtmedia_admin_page_insert', array($this,'call_get_form'),11);
|
246 |
-
// }
|
247 |
-
// }
|
248 |
-
|
249 |
/**
|
250 |
* Get plugin_info.
|
251 |
*
|
252 |
* @access public
|
|
|
253 |
* @param void
|
|
|
254 |
* @return array $rtmedia_plugins
|
255 |
*/
|
256 |
-
public function get_plugin_info()
|
257 |
-
$active_plugins = (array)get_option( 'active_plugins', array() );
|
258 |
if ( is_multisite() ){
|
259 |
$active_plugins = array_merge( $active_plugins, rtmedia_get_site_option( 'active_sitewide_plugins', array() ) );
|
260 |
}
|
@@ -262,11 +223,11 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
262 |
foreach ( $active_plugins as $plugin ) {
|
263 |
$plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
264 |
$version_string = '';
|
265 |
-
if ( ! empty( $plugin_data[
|
266 |
-
$rtmedia_plugins[
|
267 |
}
|
268 |
}
|
269 |
-
if ( sizeof( $rtmedia_plugins )
|
270 |
return false;
|
271 |
} else {
|
272 |
return implode( ', <br/>', $rtmedia_plugins );
|
@@ -277,24 +238,25 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
277 |
* Scan the rtmedia template files.
|
278 |
*
|
279 |
* @access public
|
|
|
280 |
* @param string $template_path
|
|
|
281 |
* @return array $result
|
282 |
*/
|
283 |
-
public function rtmedia_scan_template_files( $template_path )
|
284 |
$files = scandir( $template_path );
|
285 |
$result = array();
|
286 |
if ( $files ){
|
287 |
foreach ( $files as $key => $value ) {
|
288 |
-
if ( ! in_array( $value, array(
|
289 |
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ){
|
290 |
$sub_files = $this->rtmedia_scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
|
291 |
foreach ( $sub_files as $sub_file ) {
|
292 |
-
$result[
|
293 |
-
//$result[] = $value . DIRECTORY_SEPARATOR . $sub_file;
|
294 |
}
|
295 |
} else {
|
296 |
-
if (
|
297 |
-
$result[
|
298 |
}
|
299 |
}
|
300 |
}
|
@@ -308,42 +270,44 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
308 |
* Show debug_info.
|
309 |
*
|
310 |
* @access public
|
|
|
311 |
* @param void
|
|
|
312 |
* @return void
|
313 |
*/
|
314 |
-
public function debug_info()
|
315 |
global $wpdb, $wp_version, $bp;
|
316 |
$debug_info = array();
|
317 |
-
$debug_info[
|
318 |
-
$debug_info[
|
319 |
-
$debug_info[
|
320 |
-
$debug_info[
|
321 |
-
$debug_info[
|
322 |
-
$debug_info[
|
323 |
-
$debug_info[
|
324 |
-
$debug_info[
|
325 |
if ( extension_loaded( 'imagick' ) ){
|
326 |
$imagickobj = new Imagick();
|
327 |
$imagick = $message = preg_replace( " #((http|https|ftp)://(\S*?\.\S*?))(\s|\;|\)|\]|\[|\{|\}|,|\"|'|:|\<|$|\.\s)#ie", "'<a href=\"$1\" target=\"_blank\">$3</a>$4'", $imagickobj->getversion() );
|
328 |
} else {
|
329 |
-
$imagick[
|
330 |
}
|
331 |
-
$debug_info[
|
332 |
if ( extension_loaded( 'gd' ) ){
|
333 |
$gd = gd_info();
|
334 |
} else {
|
335 |
-
$gd[
|
336 |
}
|
337 |
-
$debug_info[
|
338 |
-
$debug_info[
|
339 |
-
$debug_info[
|
340 |
-
$debug_info[
|
341 |
-
$debug_info[
|
342 |
$active_theme = wp_get_theme();
|
343 |
-
$debug_info[
|
344 |
-
$debug_info[
|
345 |
-
$debug_info[
|
346 |
-
$debug_info[
|
347 |
|
348 |
$rtMedia_model = new RTMediaModel();
|
349 |
$sql = "select media_type, count(id) as count from {$rtMedia_model->table_name} where blog_id = '" . get_current_blog_id() . "' group by media_type";
|
@@ -351,7 +315,7 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
351 |
$results = $wpdb->get_results( $sql );
|
352 |
if ( $results ){
|
353 |
foreach ( $results as $media ) {
|
354 |
-
$debug_info[
|
355 |
}
|
356 |
}
|
357 |
$this->debug_info = $debug_info;
|
@@ -361,26 +325,29 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
361 |
* Generate debug_info html.
|
362 |
*
|
363 |
* @access public
|
|
|
364 |
* @param void
|
|
|
365 |
* @return void
|
366 |
*/
|
367 |
-
public function debug_info_html()
|
368 |
$this->debug_info();
|
369 |
?>
|
370 |
<div id="debug-info">
|
371 |
|
372 |
<table class="form-table">
|
373 |
-
<tbody
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
}
|
383 |
-
|
|
|
384 |
</tbody>
|
385 |
</table>
|
386 |
</div><?php
|
@@ -391,12 +358,14 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
391 |
* Check for migration_required.
|
392 |
*
|
393 |
* @access public
|
|
|
394 |
* @param void
|
|
|
395 |
* @return bool
|
396 |
*/
|
397 |
-
public function is_migration_required()
|
398 |
-
$pending_rtmedia_migrate = rtmedia_get_site_option(
|
399 |
-
if ( (
|
400 |
return false;
|
401 |
}
|
402 |
|
@@ -407,19 +376,21 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
407 |
* Generate migration_html.
|
408 |
*
|
409 |
* @access public
|
|
|
410 |
* @param type $page
|
|
|
411 |
* @return bool
|
412 |
*/
|
413 |
-
public function migration_html( $page = '' )
|
414 |
-
$pending_rtmedia_migrate = rtmedia_get_site_option(
|
415 |
|
416 |
-
$content =
|
417 |
$flag = true;
|
418 |
-
if ( (
|
419 |
$content .= __( 'There is no media found to migrate.', 'rtmedia' );
|
420 |
$flag = false;
|
421 |
}
|
422 |
-
$content = apply_filters(
|
423 |
if ( $flag ){
|
424 |
$content .= ' <div class="rtmedia-migration-support">';
|
425 |
$content .= ' <p>' . __( 'Click', 'rtmedia' ) . ' <a href="' . get_admin_url() . 'admin.php?page=rtmedia-migration">' . __( 'here', 'rtmedia' ) . '</a>' . __( 'here to migrate media from rtMedia 2.x to rtMedia 3.0+.', 'rtmedia' ) . '</p>';
|
@@ -434,34 +405,35 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
434 |
|
435 |
/**
|
436 |
* Generate rtmedia admin form.
|
437 |
-
*
|
438 |
-
* @global type
|
439 |
*
|
440 |
* @param string $form
|
|
|
441 |
* @return void
|
442 |
*/
|
443 |
-
public function get_form( $form = '' )
|
444 |
if ( empty( $form ) ){
|
445 |
-
$form = ( isset( $_POST[
|
446 |
}
|
447 |
-
if ( $form ==
|
448 |
-
$form =
|
449 |
}
|
450 |
global $current_user;
|
451 |
switch ( $form ) {
|
452 |
-
case
|
453 |
$meta_title = __( 'Submit a Bug Report', 'rtmedia' );
|
454 |
break;
|
455 |
-
case
|
456 |
$meta_title = __( 'Submit a New Feature Request', 'rtmedia' );
|
457 |
break;
|
458 |
-
case
|
459 |
$meta_title = __( 'Submit a Premium Support Request', 'rtmedia' );
|
460 |
break;
|
461 |
}
|
462 |
|
463 |
-
if (
|
464 |
-
if ( ! defined(
|
465 |
$content = '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://rtcamp.com/groups/buddypress-media/forum/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
|
466 |
$content .= '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/buddypress-media/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
|
467 |
|
@@ -473,86 +445,59 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
473 |
<div id="support-form" class="bp-media-form">
|
474 |
<ul>
|
475 |
<li>
|
476 |
-
<label class="bp-media-label" for="name"><?php _e( 'Name', 'rtmedia' ); ?>
|
477 |
-
|
478 |
-
value="<?php echo ( isset( $_REQUEST[ 'name' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'name' ] ) ) ) : $current_user->display_name; ?>"
|
479 |
-
required/>
|
480 |
</li>
|
481 |
<li>
|
482 |
-
<label class="bp-media-label" for="email"><?php _e( 'Email', 'rtmedia' ); ?>
|
483 |
-
|
484 |
-
value="<?php echo ( isset( $_REQUEST[ 'email' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'email' ] ) ) ) : get_option( 'admin_email' ); ?>"
|
485 |
-
required/>
|
486 |
</li>
|
487 |
<li>
|
488 |
-
<label class="bp-media-label" for="website"><?php _e( 'Website', 'rtmedia' ); ?>
|
489 |
-
|
490 |
-
value="<?php echo ( isset( $_REQUEST[ 'website' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'website' ] ) ) ) : get_bloginfo( 'url' ); ?>"
|
491 |
-
required/>
|
492 |
</li>
|
493 |
<li>
|
494 |
-
<label class="bp-media-label" for="phone"><?php _e( 'Phone', 'rtmedia' ); ?>
|
495 |
-
|
496 |
-
value="<?php echo ( isset( $_REQUEST[ 'phone' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'phone' ] ) ) ) : ''; ?>"/>
|
497 |
</li>
|
498 |
<li>
|
499 |
-
<label class="bp-media-label" for="subject"><?php _e( 'Subject', 'rtmedia' ); ?>
|
500 |
-
|
501 |
-
value="<?php echo ( isset( $_REQUEST[ 'subject' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'subject' ] ) ) ) : ''; ?>"
|
502 |
-
required/>
|
503 |
</li>
|
504 |
<li>
|
505 |
-
<label class="bp-media-label" for="details"><?php _e( 'Details', 'rtmedia' ); ?>
|
506 |
-
|
507 |
-
required/><?php echo ( isset( $_REQUEST[ 'details' ] ) ) ? esc_textarea( stripslashes( trim( $_REQUEST[ 'details' ] ) ) ) : ''; ?></textarea>
|
508 |
</li>
|
509 |
<input type="hidden" name="request_type" value="<?php echo $form; ?>"/>
|
510 |
-
<input type="hidden" name="request_id"
|
511 |
-
|
512 |
-
<input type="hidden" name="
|
513 |
-
|
514 |
-
<input type="hidden" name="
|
515 |
-
<input type="hidden" name="server_type"
|
516 |
-
value="<?php echo $_SERVER[ 'SERVER_SOFTWARE' ]; ?>"/>
|
517 |
-
<input type="hidden" name="user_agent"
|
518 |
-
value="<?php echo $_SERVER[ 'HTTP_USER_AGENT' ]; ?>"/>
|
519 |
-
|
520 |
</ul>
|
521 |
-
</div><!-- .submit-bug-box --><?php if (
|
522 |
<h3><?php _e( 'Additional Information', 'rtmedia' ); ?></h3>
|
523 |
<div id="support-form" class="bp-media-form">
|
524 |
<ul>
|
525 |
-
|
526 |
<li>
|
527 |
-
<label class="bp-media-label"
|
528 |
-
|
529 |
-
class="bp-media-input" id="wp_admin_username" type="text"
|
530 |
-
name="wp_admin_username"
|
531 |
-
value="<?php echo ( isset( $_REQUEST[ 'wp_admin_username' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'wp_admin_username' ] ) ) ) : $current_user->user_login; ?>"/>
|
532 |
</li>
|
533 |
<li>
|
534 |
-
<label class="bp-media-label"
|
535 |
-
|
536 |
-
class="bp-media-input" id="wp_admin_pwd" type="password" name="wp_admin_pwd"
|
537 |
-
value="<?php echo ( isset( $_REQUEST[ 'wp_admin_pwd' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'wp_admin_pwd' ] ) ) ) : ''; ?>"/>
|
538 |
</li>
|
539 |
<li>
|
540 |
-
<label class="bp-media-label"
|
541 |
-
|
542 |
-
class="bp-media-input" id="ssh_ftp_host" type="text" name="ssh_ftp_host"
|
543 |
-
value="<?php echo ( isset( $_REQUEST[ 'ssh_ftp_host' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'ssh_ftp_host' ] ) ) ) : ''; ?>"/>
|
544 |
</li>
|
545 |
<li>
|
546 |
-
<label class="bp-media-label"
|
547 |
-
|
548 |
-
class="bp-media-input" id="ssh_ftp_username" type="text" name="ssh_ftp_username"
|
549 |
-
value="<?php echo ( isset( $_REQUEST[ 'ssh_ftp_username' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'ssh_ftp_username' ] ) ) ) : ''; ?>"/>
|
550 |
</li>
|
551 |
<li>
|
552 |
-
<label class="bp-media-label"
|
553 |
-
|
554 |
-
class="bp-media-input" id="ssh_ftp_pwd" type="password" name="ssh_ftp_pwd"
|
555 |
-
value="<?php echo ( isset( $_REQUEST[ 'ssh_ftp_pwd' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'ssh_ftp_pwd' ] ) ) ) : ''; ?>"/>
|
556 |
</li>
|
557 |
</ul>
|
558 |
</div><!-- .submit-bug-box --><?php } ?>
|
@@ -570,29 +515,30 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
570 |
|
571 |
/**
|
572 |
* Now submit request.
|
573 |
-
*
|
574 |
* @global type $rtmedia
|
575 |
*
|
576 |
-
* @param
|
|
|
577 |
* @return void
|
578 |
*/
|
579 |
-
public function submit_request()
|
580 |
$this->debug_info();
|
581 |
global $rtmedia;
|
582 |
-
$form_data = wp_parse_args( $_POST[
|
583 |
foreach ( $form_data as $key => $formdata ) {
|
584 |
-
if (
|
585 |
-
echo
|
586 |
die();
|
587 |
}
|
588 |
}
|
589 |
-
if ( $form_data[
|
590 |
$mail_type = 'Premium Support';
|
591 |
$title = __( 'rtMedia Premium Support Request from', 'rtmedia' );
|
592 |
-
} elseif ( $form_data[
|
593 |
$mail_type = 'New Feature Request';
|
594 |
$title = __( 'rtMedia New Feature Request from', 'rtmedia' );
|
595 |
-
} elseif ( $form_data[
|
596 |
$mail_type = 'Bug Report';
|
597 |
$title = __( 'rtMedia Bug Report from', 'rtmedia' );
|
598 |
} else {
|
@@ -606,53 +552,53 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
606 |
<body>
|
607 |
<table>
|
608 |
<tr>
|
609 |
-
<td>Name</td><td>' . strip_tags( $form_data[
|
610 |
</tr>
|
611 |
<tr>
|
612 |
-
<td>Email</td><td>' . strip_tags( $form_data[
|
613 |
</tr>
|
614 |
<tr>
|
615 |
-
<td>Website</td><td>' . strip_tags( $form_data[
|
616 |
</tr>
|
617 |
<tr>
|
618 |
-
<td>Phone</td><td>' . strip_tags( $form_data[
|
619 |
</tr>
|
620 |
<tr>
|
621 |
-
<td>Subject</td><td>' . strip_tags( $form_data[
|
622 |
</tr>
|
623 |
<tr>
|
624 |
-
<td>Details</td><td>' . strip_tags( $form_data[
|
625 |
</tr>
|
626 |
<tr>
|
627 |
-
<td>Request ID</td><td>' . strip_tags( $form_data[
|
628 |
</tr>
|
629 |
<tr>
|
630 |
-
<td>Server Address</td><td>' . strip_tags( $form_data[
|
631 |
</tr>
|
632 |
<tr>
|
633 |
-
<td>IP Address</td><td>' . strip_tags( $form_data[
|
634 |
</tr>
|
635 |
<tr>
|
636 |
-
<td>Server Type</td><td>' . strip_tags( $form_data[
|
637 |
</tr>
|
638 |
<tr>
|
639 |
-
<td>User Agent</td><td>' . strip_tags( $form_data[
|
640 |
</tr>';
|
641 |
-
if ( $form_data[
|
642 |
$message .= '<tr>
|
643 |
-
<td>WordPress Admin Username</td><td>' . strip_tags( $form_data[
|
644 |
</tr>
|
645 |
<tr>
|
646 |
-
<td>WordPress Admin Password</td><td>' . strip_tags( $form_data[
|
647 |
</tr>
|
648 |
<tr>
|
649 |
-
<td>SSH FTP Host</td><td>' . strip_tags( $form_data[
|
650 |
</tr>
|
651 |
<tr>
|
652 |
-
<td>SSH FTP Username</td><td>' . strip_tags( $form_data[
|
653 |
</tr>
|
654 |
<tr>
|
655 |
-
<td>SSH FTP Password</td><td>' . strip_tags( $form_data[
|
656 |
</tr>
|
657 |
';
|
658 |
}
|
@@ -670,16 +616,16 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
670 |
$message .= '</body>
|
671 |
</html>';
|
672 |
add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html";' ) );
|
673 |
-
$headers = 'From: ' . $form_data[
|
674 |
if ( isset( $rtmedia->support_email ) ){
|
675 |
$support_email = $rtmedia->support_email;
|
676 |
} else {
|
677 |
-
$support_email =
|
678 |
}
|
679 |
-
$support_email =
|
680 |
-
if ( wp_mail( $support_email, '[rtmedia] ' . $mail_type . ' from ' . str_replace( array( 'http://', 'https://' ), '', $form_data[
|
681 |
echo '<div class="rtmedia-success" style="margin:10px 0;">';
|
682 |
-
if ( $form_data[
|
683 |
echo '<p>' . __( 'Thank you for your Feedback/Suggestion.', 'rtmedia' ) . '</p>';
|
684 |
} else {
|
685 |
echo '<p>' . __( 'Thank you for posting your support request.', 'rtmedia' ) . '</p>';
|
16 |
* Constructor
|
17 |
*
|
18 |
* @access public
|
19 |
+
*
|
20 |
* @param bool $init
|
21 |
+
*
|
22 |
* @return void
|
23 |
*/
|
24 |
+
public function __construct( $init = true ){
|
25 |
|
26 |
if ( ! is_admin() ){
|
27 |
return;
|
28 |
}
|
29 |
|
30 |
+
$this->curr_sub_tab = 'support';
|
31 |
+
if ( isset( $_REQUEST['tab'] ) ){
|
32 |
+
$this->curr_sub_tab = $_REQUEST['tab'];
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
/**
|
37 |
* Get support content.
|
38 |
*
|
39 |
* @access public
|
40 |
+
*
|
41 |
* @param void
|
42 |
+
*
|
43 |
* @return void
|
44 |
*/
|
45 |
+
public function get_support_content(){
|
46 |
$tabs = array();
|
47 |
global $rtmedia_admin;
|
48 |
+
$tabs[] = array(
|
49 |
+
'title' => __( 'Premium Support', 'rtmedia' ),
|
50 |
+
'name' => __( 'Premium Support', 'rtmedia' ),
|
51 |
+
'href' => '#support',
|
52 |
+
'callback' => array( $this, 'call_get_form' ),
|
53 |
);
|
54 |
+
$tabs[] = array(
|
55 |
+
'title' => __( 'Debug Info', 'rtmedia' ),
|
56 |
+
'name' => __( 'Debug Info', 'rtmedia' ),
|
57 |
+
'href' => '#debug',
|
58 |
+
'callback' => array( $this, 'debug_info_html' ),
|
59 |
);
|
60 |
if ( $this->is_migration_required() ){ //if any un-migrated media is there
|
61 |
+
$tabs[] = array(
|
62 |
+
'title' => __( 'Migration', 'rtmedia' ),
|
63 |
+
'name' => __( 'Migration', 'rtmedia' ),
|
64 |
+
'href' => '#migration',
|
65 |
+
'callback' => array( $this, 'migration_html' ),
|
66 |
);
|
67 |
}
|
68 |
?>
|
69 |
<div id="rtm-support">
|
70 |
<div class="horizontal-tabs">
|
71 |
<dl class='tabs' data-tab>
|
72 |
+
<?php
|
73 |
+
$i = 1;
|
74 |
+
foreach ( $tabs as $tab ) {
|
75 |
+
$active_class = '';
|
76 |
+
if ( 1 == $i ){
|
77 |
+
$active_class = 'active';
|
78 |
+
}
|
79 |
+
$i ++;
|
80 |
+
?>
|
81 |
+
<dd class="<?php echo $active_class ?>">
|
82 |
+
<a id="tab-<?php echo substr( $tab['href'], 1 ) ?>"
|
83 |
+
title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href'] ?>"
|
84 |
+
class="rtmedia-tab-title <?php echo sanitize_title( $tab['name'] ) ?>"><?php echo $tab['name'] ?></a>
|
85 |
+
</dd>
|
86 |
+
<?php
|
87 |
+
}
|
88 |
+
?>
|
89 |
</dl>
|
90 |
+
<?php
|
91 |
+
$k = 1;
|
92 |
+
$active_class = '';
|
93 |
+
echo "<div class='tabs-content'>";
|
94 |
+
foreach ( $tabs as $tab ) {
|
95 |
+
$active_class = '';
|
96 |
+
if ( 1 == $k ){
|
97 |
+
$active_class = ' active';
|
98 |
+
}
|
99 |
+
$k ++;
|
100 |
+
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
101 |
+
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
102 |
+
}
|
103 |
+
$tab_without_hash = explode( '#', $tab['href'] );
|
104 |
+
$tab_without_hash = $tab_without_hash[1];
|
105 |
+
echo '<div class="row content' . $active_class . '" id="' . $tab_without_hash . '">';
|
106 |
+
echo '<div class="large-12 columns">';
|
107 |
+
call_user_func( $tab['callback'] );
|
108 |
+
echo '</div>';
|
109 |
+
echo '</div>';
|
110 |
+
}
|
111 |
+
echo '</div>';
|
112 |
+
?>
|
113 |
</div>
|
114 |
</div>
|
115 |
<?php
|
120 |
* Render support.
|
121 |
*
|
122 |
* @access public
|
123 |
+
*
|
124 |
* @param type $page
|
125 |
+
*
|
126 |
* @return void
|
127 |
*/
|
128 |
+
public function render_support( $page = '' ){
|
129 |
global $wp_settings_sections, $wp_settings_fields;
|
130 |
|
131 |
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
132 |
return;
|
133 |
}
|
134 |
|
135 |
+
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
136 |
|
137 |
+
if ( $section['callback'] ){
|
138 |
+
call_user_func( $section['callback'], $section );
|
139 |
}
|
140 |
|
141 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
142 |
continue;
|
143 |
}
|
144 |
|
145 |
echo '<table class="form-table">';
|
146 |
+
do_settings_fields( $page, $section['id'] );
|
147 |
echo '</table>';
|
148 |
}
|
149 |
}
|
152 |
* Define Service Selector.
|
153 |
*
|
154 |
* @access public
|
155 |
+
*
|
156 |
* @param void
|
157 |
+
*
|
158 |
* @return void
|
159 |
*/
|
160 |
+
public function service_selector(){
|
161 |
?>
|
162 |
<div>
|
163 |
<form name="rtmedia_service_select_form" method="post">
|
165 |
<label class="bp-media-label" for="select_support"><?php _e( 'Service', 'rtmedia' ); ?>:</label>
|
166 |
<select name="rtmedia_service_select">
|
167 |
<option
|
168 |
+
value="premium_support" <?php if ( 'premium_support' == $_POST['form'] ){
|
169 |
+
echo 'selected';
|
170 |
} ?>><?php _e( 'Premium Support', 'rtmedia' ); ?></option>
|
171 |
<option
|
172 |
+
value="bug_report" <?php if ( 'bug_report' == $_POST['form'] ){
|
173 |
+
echo 'selected';
|
174 |
} ?>><?php _e( 'Bug Report', 'rtmedia' ); ?></option>
|
175 |
<option
|
176 |
+
value="new_feature" <?php if ( 'new_feature' == $_POST['form'] ){
|
177 |
+
echo 'selected';
|
178 |
} ?>><?php _e( 'New Feature', 'rtmedia' ); ?></option>
|
179 |
</select>
|
180 |
+
<input name="support_submit" value="<?php esc_attr_e( 'Submit', 'rtmedia' ); ?>" type="submit" class="button"/>
|
|
|
181 |
</p>
|
182 |
</form>
|
183 |
</div>
|
184 |
<?php
|
|
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
/**
|
189 |
* Call rtmedia admin support form.
|
190 |
*
|
191 |
* @access public
|
192 |
+
*
|
193 |
* @param void
|
194 |
+
*
|
195 |
* @return void
|
196 |
*/
|
197 |
+
public function call_get_form(){
|
198 |
+
if ( isset( $_REQUEST['page'] ) && 'rtmedia-support' == $_REQUEST['page'] ){
|
199 |
//echo "<h2 class='nav-tab-wrapper'>".$this->rtmedia_support_sub_tabs()."</h2>";
|
200 |
+
if ( 'support' == $this->curr_sub_tab ){
|
201 |
echo "<div id='rtmedia_service_contact_container'><form name='rtmedia_service_contact_detail' method='post'>";
|
202 |
+
$this->get_form( 'premium_support' );
|
203 |
+
echo '</form></div>';
|
204 |
}
|
205 |
}
|
206 |
}
|
207 |
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
/**
|
209 |
* Get plugin_info.
|
210 |
*
|
211 |
* @access public
|
212 |
+
*
|
213 |
* @param void
|
214 |
+
*
|
215 |
* @return array $rtmedia_plugins
|
216 |
*/
|
217 |
+
public function get_plugin_info(){
|
218 |
+
$active_plugins = (array) get_option( 'active_plugins', array() );
|
219 |
if ( is_multisite() ){
|
220 |
$active_plugins = array_merge( $active_plugins, rtmedia_get_site_option( 'active_sitewide_plugins', array() ) );
|
221 |
}
|
223 |
foreach ( $active_plugins as $plugin ) {
|
224 |
$plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
225 |
$version_string = '';
|
226 |
+
if ( ! empty( $plugin_data['Name'] ) ){
|
227 |
+
$rtmedia_plugins[] = $plugin_data['Name'] . ' ' . __( 'by', 'rtmedia' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'rtmedia' ) . ' ' . $plugin_data['Version'] . $version_string;
|
228 |
}
|
229 |
}
|
230 |
+
if ( 0 == sizeof( $rtmedia_plugins ) ){
|
231 |
return false;
|
232 |
} else {
|
233 |
return implode( ', <br/>', $rtmedia_plugins );
|
238 |
* Scan the rtmedia template files.
|
239 |
*
|
240 |
* @access public
|
241 |
+
*
|
242 |
* @param string $template_path
|
243 |
+
*
|
244 |
* @return array $result
|
245 |
*/
|
246 |
+
public function rtmedia_scan_template_files( $template_path ){
|
247 |
$files = scandir( $template_path );
|
248 |
$result = array();
|
249 |
if ( $files ){
|
250 |
foreach ( $files as $key => $value ) {
|
251 |
+
if ( ! in_array( $value, array( '.', '..' ) ) ){
|
252 |
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ){
|
253 |
$sub_files = $this->rtmedia_scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
|
254 |
foreach ( $sub_files as $sub_file ) {
|
255 |
+
$result[] = str_replace( ABSPATH . 'wp-content/', '', RTMediaTemplate::locate_template( substr( $sub_file, 0, ( sizeof( $sub_file ) - 5 ) ) ) );
|
|
|
256 |
}
|
257 |
} else {
|
258 |
+
if ( 'main.php' != $value ){
|
259 |
+
$result[] = $value;
|
260 |
}
|
261 |
}
|
262 |
}
|
270 |
* Show debug_info.
|
271 |
*
|
272 |
* @access public
|
273 |
+
*
|
274 |
* @param void
|
275 |
+
*
|
276 |
* @return void
|
277 |
*/
|
278 |
+
public function debug_info(){
|
279 |
global $wpdb, $wp_version, $bp;
|
280 |
$debug_info = array();
|
281 |
+
$debug_info['Home URL'] = home_url();
|
282 |
+
$debug_info['Site URL'] = site_url();
|
283 |
+
$debug_info['PHP'] = PHP_VERSION;
|
284 |
+
$debug_info['MYSQL'] = $wpdb->db_version();
|
285 |
+
$debug_info['WordPress'] = $wp_version;
|
286 |
+
$debug_info['BuddyPress'] = ( isset( $bp->version ) ) ? $bp->version : '-NA-';
|
287 |
+
$debug_info['rtMedia'] = RTMEDIA_VERSION;
|
288 |
+
$debug_info['OS'] = PHP_OS;
|
289 |
if ( extension_loaded( 'imagick' ) ){
|
290 |
$imagickobj = new Imagick();
|
291 |
$imagick = $message = preg_replace( " #((http|https|ftp)://(\S*?\.\S*?))(\s|\;|\)|\]|\[|\{|\}|,|\"|'|:|\<|$|\.\s)#ie", "'<a href=\"$1\" target=\"_blank\">$3</a>$4'", $imagickobj->getversion() );
|
292 |
} else {
|
293 |
+
$imagick['versionString'] = 'Not Installed';
|
294 |
}
|
295 |
+
$debug_info['Imagick'] = $imagick['versionString'];
|
296 |
if ( extension_loaded( 'gd' ) ){
|
297 |
$gd = gd_info();
|
298 |
} else {
|
299 |
+
$gd['GD Version'] = 'Not Installed';
|
300 |
}
|
301 |
+
$debug_info['GD'] = $gd['GD Version'];
|
302 |
+
$debug_info['[php.ini] post_max_size'] = ini_get( 'post_max_size' );
|
303 |
+
$debug_info['[php.ini] upload_max_filesize'] = ini_get( 'upload_max_filesize' );
|
304 |
+
$debug_info['[php.ini] memory_limit'] = ini_get( 'memory_limit' );
|
305 |
+
$debug_info['Installed Plugins'] = $this->get_plugin_info();
|
306 |
$active_theme = wp_get_theme();
|
307 |
+
$debug_info['Theme Name'] = $active_theme->Name;
|
308 |
+
$debug_info['Theme Version'] = $active_theme->Version;
|
309 |
+
$debug_info['Author URL'] = $active_theme->{'Author URI'};
|
310 |
+
$debug_info['Template Overrides'] = implode( ', <br/>', $this->rtmedia_scan_template_files( RTMEDIA_PATH . '/templates/' ) );
|
311 |
|
312 |
$rtMedia_model = new RTMediaModel();
|
313 |
$sql = "select media_type, count(id) as count from {$rtMedia_model->table_name} where blog_id = '" . get_current_blog_id() . "' group by media_type";
|
315 |
$results = $wpdb->get_results( $sql );
|
316 |
if ( $results ){
|
317 |
foreach ( $results as $media ) {
|
318 |
+
$debug_info[ 'Total ' . ucfirst( $media->media_type ) . 's' ] = $media->count;
|
319 |
}
|
320 |
}
|
321 |
$this->debug_info = $debug_info;
|
325 |
* Generate debug_info html.
|
326 |
*
|
327 |
* @access public
|
328 |
+
*
|
329 |
* @param void
|
330 |
+
*
|
331 |
* @return void
|
332 |
*/
|
333 |
+
public function debug_info_html(){
|
334 |
$this->debug_info();
|
335 |
?>
|
336 |
<div id="debug-info">
|
337 |
|
338 |
<table class="form-table">
|
339 |
+
<tbody>
|
340 |
+
<?php
|
341 |
+
if ( $this->debug_info ){
|
342 |
+
foreach ( $this->debug_info as $configuration => $value ) {
|
343 |
+
?>
|
344 |
+
<tr valign="top">
|
345 |
+
<th scope="row"><?php echo $configuration; ?></th>
|
346 |
+
<td><?php echo $value; ?></td>
|
347 |
+
</tr><?php
|
348 |
}
|
349 |
+
}
|
350 |
+
?>
|
351 |
</tbody>
|
352 |
</table>
|
353 |
</div><?php
|
358 |
* Check for migration_required.
|
359 |
*
|
360 |
* @access public
|
361 |
+
*
|
362 |
* @param void
|
363 |
+
*
|
364 |
* @return bool
|
365 |
*/
|
366 |
+
public function is_migration_required(){
|
367 |
+
$pending_rtmedia_migrate = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
368 |
+
if ( ( false === $pending_rtmedia_migrate || 0 == $pending_rtmedia_migrate ) ){
|
369 |
return false;
|
370 |
}
|
371 |
|
376 |
* Generate migration_html.
|
377 |
*
|
378 |
* @access public
|
379 |
+
*
|
380 |
* @param type $page
|
381 |
+
*
|
382 |
* @return bool
|
383 |
*/
|
384 |
+
public function migration_html( $page = '' ){
|
385 |
+
$pending_rtmedia_migrate = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
386 |
|
387 |
+
$content = ' ';
|
388 |
$flag = true;
|
389 |
+
if ( ( false === $pending_rtmedia_migrate || 0 == $pending_rtmedia_migrate ) ){
|
390 |
$content .= __( 'There is no media found to migrate.', 'rtmedia' );
|
391 |
$flag = false;
|
392 |
}
|
393 |
+
$content = apply_filters( 'rtmedia_migration_content_filter', $content );
|
394 |
if ( $flag ){
|
395 |
$content .= ' <div class="rtmedia-migration-support">';
|
396 |
$content .= ' <p>' . __( 'Click', 'rtmedia' ) . ' <a href="' . get_admin_url() . 'admin.php?page=rtmedia-migration">' . __( 'here', 'rtmedia' ) . '</a>' . __( 'here to migrate media from rtMedia 2.x to rtMedia 3.0+.', 'rtmedia' ) . '</p>';
|
405 |
|
406 |
/**
|
407 |
* Generate rtmedia admin form.
|
408 |
+
*
|
409 |
+
* @global type $current_user
|
410 |
*
|
411 |
* @param string $form
|
412 |
+
*
|
413 |
* @return void
|
414 |
*/
|
415 |
+
public function get_form( $form = '' ){
|
416 |
if ( empty( $form ) ){
|
417 |
+
$form = ( isset( $_POST['form'] ) ) ? $_POST['form'] : '';
|
418 |
}
|
419 |
+
if ( $form == '' ){
|
420 |
+
$form = 'premium_support';
|
421 |
}
|
422 |
global $current_user;
|
423 |
switch ( $form ) {
|
424 |
+
case 'bug_report':
|
425 |
$meta_title = __( 'Submit a Bug Report', 'rtmedia' );
|
426 |
break;
|
427 |
+
case 'new_feature':
|
428 |
$meta_title = __( 'Submit a New Feature Request', 'rtmedia' );
|
429 |
break;
|
430 |
+
case 'premium_support':
|
431 |
$meta_title = __( 'Submit a Premium Support Request', 'rtmedia' );
|
432 |
break;
|
433 |
}
|
434 |
|
435 |
+
if ( 'premium_support' == $form ){
|
436 |
+
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ){
|
437 |
$content = '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://rtcamp.com/groups/buddypress-media/forum/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
|
438 |
$content .= '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/buddypress-media/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
|
439 |
|
445 |
<div id="support-form" class="bp-media-form">
|
446 |
<ul>
|
447 |
<li>
|
448 |
+
<label class="bp-media-label" for="name"><?php _e( 'Name', 'rtmedia' ); ?> :</label>
|
449 |
+
<input class="bp-media-input" id="name" type="text" name="name" value="<?php echo ( isset( $_REQUEST['name'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['name'] ) ) ) : $current_user->display_name; ?>" required/>
|
|
|
|
|
450 |
</li>
|
451 |
<li>
|
452 |
+
<label class="bp-media-label" for="email"><?php _e( 'Email', 'rtmedia' ); ?> :</label>
|
453 |
+
<input id="email" class="bp-media-input" type="text" name="email" value="<?php echo ( isset( $_REQUEST['email'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['email'] ) ) ) : get_option( 'admin_email' ); ?>" required/>
|
|
|
|
|
454 |
</li>
|
455 |
<li>
|
456 |
+
<label class="bp-media-label" for="website"><?php _e( 'Website', 'rtmedia' ); ?> :</label>
|
457 |
+
<input id="website" class="bp-media-input" type="text" name="website" value="<?php echo ( isset( $_REQUEST['website'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['website'] ) ) ) : get_bloginfo( 'url' ); ?>" required/>
|
|
|
|
|
458 |
</li>
|
459 |
<li>
|
460 |
+
<label class="bp-media-label" for="phone"><?php _e( 'Phone', 'rtmedia' ); ?> :</label>
|
461 |
+
<input class="bp-media-input" id="phone" type="text" name="phone" value="<?php echo ( isset( $_REQUEST['phone'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['phone'] ) ) ) : ''; ?>"/>
|
|
|
462 |
</li>
|
463 |
<li>
|
464 |
+
<label class="bp-media-label" for="subject"><?php _e( 'Subject', 'rtmedia' ); ?> :</label>
|
465 |
+
<input id="subject" class="bp-media-input" type="text" name="subject" value="<?php echo ( isset( $_REQUEST['subject'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['subject'] ) ) ) : ''; ?>" required/>
|
|
|
|
|
466 |
</li>
|
467 |
<li>
|
468 |
+
<label class="bp-media-label" for="details"><?php _e( 'Details', 'rtmedia' ); ?> :</label>
|
469 |
+
<textarea id="details" class="bp-media-textarea" type="text" name="details" required/><?php echo ( isset( $_REQUEST['details'] ) ) ? esc_textarea( stripslashes( trim( $_REQUEST['details'] ) ) ) : ''; ?></textarea>
|
|
|
470 |
</li>
|
471 |
<input type="hidden" name="request_type" value="<?php echo $form; ?>"/>
|
472 |
+
<input type="hidden" name="request_id" value="<?php echo wp_create_nonce( date( 'YmdHis' ) ); ?>"/>
|
473 |
+
<input type="hidden" name="server_address" value="<?php echo $_SERVER['SERVER_ADDR']; ?>"/>
|
474 |
+
<input type="hidden" name="ip_address" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>"/>
|
475 |
+
<input type="hidden" name="server_type" value="<?php echo $_SERVER['SERVER_SOFTWARE']; ?>"/>
|
476 |
+
<input type="hidden" name="user_agent" value="<?php echo $_SERVER['HTTP_USER_AGENT']; ?>"/>
|
|
|
|
|
|
|
|
|
|
|
477 |
</ul>
|
478 |
+
</div><!-- .submit-bug-box --><?php if ( 'bug_report' == $form ){ ?>
|
479 |
<h3><?php _e( 'Additional Information', 'rtmedia' ); ?></h3>
|
480 |
<div id="support-form" class="bp-media-form">
|
481 |
<ul>
|
|
|
482 |
<li>
|
483 |
+
<label class="bp-media-label" for="wp_admin_username"><?php _e( 'Your WP Admin Login:', 'rtmedia' ); ?></label>
|
484 |
+
<input class="bp-media-input" id="wp_admin_username" type="text" name="wp_admin_username" value="<?php echo ( isset( $_REQUEST['wp_admin_username'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['wp_admin_username'] ) ) ) : $current_user->user_login; ?>"/>
|
|
|
|
|
|
|
485 |
</li>
|
486 |
<li>
|
487 |
+
<label class="bp-media-label" for="wp_admin_pwd"><?php _e( 'Your WP Admin password:', 'rtmedia' ); ?></label>
|
488 |
+
<input class="bp-media-input" id="wp_admin_pwd" type="password" name="wp_admin_pwd" value="<?php echo ( isset( $_REQUEST['wp_admin_pwd'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['wp_admin_pwd'] ) ) ) : ''; ?>"/>
|
|
|
|
|
489 |
</li>
|
490 |
<li>
|
491 |
+
<label class="bp-media-label" for="ssh_ftp_host"><?php _e( 'Your SSH / FTP host:', 'rtmedia' ); ?></label>
|
492 |
+
<input class="bp-media-input" id="ssh_ftp_host" type="text" name="ssh_ftp_host" value="<?php echo ( isset( $_REQUEST['ssh_ftp_host'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['ssh_ftp_host'] ) ) ) : ''; ?>"/>
|
|
|
|
|
493 |
</li>
|
494 |
<li>
|
495 |
+
<label class="bp-media-label" for="ssh_ftp_username"><?php _e( 'Your SSH / FTP login:', 'rtmedia' ); ?></label>
|
496 |
+
<input class="bp-media-input" id="ssh_ftp_username" type="text" name="ssh_ftp_username" value="<?php echo ( isset( $_REQUEST['ssh_ftp_username'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['ssh_ftp_username'] ) ) ) : ''; ?>"/>
|
|
|
|
|
497 |
</li>
|
498 |
<li>
|
499 |
+
<label class="bp-media-label" for="ssh_ftp_pwd"><?php _e( 'Your SSH / FTP password:', 'rtmedia' ); ?></label>
|
500 |
+
<input class="bp-media-input" id="ssh_ftp_pwd" type="password" name="ssh_ftp_pwd" value="<?php echo ( isset( $_REQUEST['ssh_ftp_pwd'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['ssh_ftp_pwd'] ) ) ) : ''; ?>"/>
|
|
|
|
|
501 |
</li>
|
502 |
</ul>
|
503 |
</div><!-- .submit-bug-box --><?php } ?>
|
515 |
|
516 |
/**
|
517 |
* Now submit request.
|
518 |
+
*
|
519 |
* @global type $rtmedia
|
520 |
*
|
521 |
+
* @param void
|
522 |
+
*
|
523 |
* @return void
|
524 |
*/
|
525 |
+
public function submit_request(){
|
526 |
$this->debug_info();
|
527 |
global $rtmedia;
|
528 |
+
$form_data = wp_parse_args( $_POST['form_data'] );
|
529 |
foreach ( $form_data as $key => $formdata ) {
|
530 |
+
if ( '' == $formdata && 'phone' != $key ){
|
531 |
+
echo 'false';
|
532 |
die();
|
533 |
}
|
534 |
}
|
535 |
+
if ( 'premium_support' == $form_data['request_type'] ){
|
536 |
$mail_type = 'Premium Support';
|
537 |
$title = __( 'rtMedia Premium Support Request from', 'rtmedia' );
|
538 |
+
} elseif ( 'new_feature' == $form_data['request_type'] ) {
|
539 |
$mail_type = 'New Feature Request';
|
540 |
$title = __( 'rtMedia New Feature Request from', 'rtmedia' );
|
541 |
+
} elseif ( 'bug_report' == $form_data['request_type'] ) {
|
542 |
$mail_type = 'Bug Report';
|
543 |
$title = __( 'rtMedia Bug Report from', 'rtmedia' );
|
544 |
} else {
|
552 |
<body>
|
553 |
<table>
|
554 |
<tr>
|
555 |
+
<td>Name</td><td>' . strip_tags( $form_data['name'] ) . '</td>
|
556 |
</tr>
|
557 |
<tr>
|
558 |
+
<td>Email</td><td>' . strip_tags( $form_data['email'] ) . '</td>
|
559 |
</tr>
|
560 |
<tr>
|
561 |
+
<td>Website</td><td>' . strip_tags( $form_data['website'] ) . '</td>
|
562 |
</tr>
|
563 |
<tr>
|
564 |
+
<td>Phone</td><td>' . strip_tags( $form_data['phone'] ) . '</td>
|
565 |
</tr>
|
566 |
<tr>
|
567 |
+
<td>Subject</td><td>' . strip_tags( $form_data['subject'] ) . '</td>
|
568 |
</tr>
|
569 |
<tr>
|
570 |
+
<td>Details</td><td>' . strip_tags( $form_data['details'] ) . '</td>
|
571 |
</tr>
|
572 |
<tr>
|
573 |
+
<td>Request ID</td><td>' . strip_tags( $form_data['request_id'] ) . '</td>
|
574 |
</tr>
|
575 |
<tr>
|
576 |
+
<td>Server Address</td><td>' . strip_tags( $form_data['server_address'] ) . '</td>
|
577 |
</tr>
|
578 |
<tr>
|
579 |
+
<td>IP Address</td><td>' . strip_tags( $form_data['ip_address'] ) . '</td>
|
580 |
</tr>
|
581 |
<tr>
|
582 |
+
<td>Server Type</td><td>' . strip_tags( $form_data['server_type'] ) . '</td>
|
583 |
</tr>
|
584 |
<tr>
|
585 |
+
<td>User Agent</td><td>' . strip_tags( $form_data['user_agent'] ) . '</td>
|
586 |
</tr>';
|
587 |
+
if ( 'bug_report' == $form_data['request_type'] ){
|
588 |
$message .= '<tr>
|
589 |
+
<td>WordPress Admin Username</td><td>' . strip_tags( $form_data['wp_admin_username'] ) . '</td>
|
590 |
</tr>
|
591 |
<tr>
|
592 |
+
<td>WordPress Admin Password</td><td>' . strip_tags( $form_data['wp_admin_pwd'] ) . '</td>
|
593 |
</tr>
|
594 |
<tr>
|
595 |
+
<td>SSH FTP Host</td><td>' . strip_tags( $form_data['ssh_ftp_host'] ) . '</td>
|
596 |
</tr>
|
597 |
<tr>
|
598 |
+
<td>SSH FTP Username</td><td>' . strip_tags( $form_data['ssh_ftp_username'] ) . '</td>
|
599 |
</tr>
|
600 |
<tr>
|
601 |
+
<td>SSH FTP Password</td><td>' . strip_tags( $form_data['ssh_ftp_pwd'] ) . '</td>
|
602 |
</tr>
|
603 |
';
|
604 |
}
|
616 |
$message .= '</body>
|
617 |
</html>';
|
618 |
add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html";' ) );
|
619 |
+
$headers = 'From: ' . $form_data['name'] . ' <' . $form_data['email'] . '>' . "\r\n";
|
620 |
if ( isset( $rtmedia->support_email ) ){
|
621 |
$support_email = $rtmedia->support_email;
|
622 |
} else {
|
623 |
+
$support_email = 'support@rtcamp.com';
|
624 |
}
|
625 |
+
$support_email = 'support@rtcamp.com';
|
626 |
+
if ( wp_mail( $support_email, '[rtmedia] ' . $mail_type . ' from ' . str_replace( array( 'http://', 'https://' ), '', $form_data['website'] ), $message, $headers ) ){
|
627 |
echo '<div class="rtmedia-success" style="margin:10px 0;">';
|
628 |
+
if ( 'new_feature' == $form_data['request_type'] ){
|
629 |
echo '<p>' . __( 'Thank you for your Feedback/Suggestion.', 'rtmedia' ) . '</p>';
|
630 |
} else {
|
631 |
echo '<p>' . __( 'Thank you for posting your support request.', 'rtmedia' ) . '</p>';
|
app/helper/RTMediaThemes.php
CHANGED
@@ -17,125 +17,141 @@ class RTMediaThemes {
|
|
17 |
* Render themes
|
18 |
*
|
19 |
* @access public
|
|
|
20 |
* @param type $page
|
|
|
21 |
* @return void
|
22 |
*/
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
foreach ( (array) $wp_settings_sections[$page] as $section ) {
|
31 |
|
32 |
-
|
33 |
-
call_user_func( $section['callback'], $section );
|
34 |
-
}
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
echo '</table>';
|
43 |
}
|
|
|
|
|
|
|
|
|
44 |
}
|
|
|
45 |
|
46 |
-
|
47 |
* Get themes.
|
48 |
*
|
49 |
* @access public
|
|
|
50 |
* @param void
|
|
|
51 |
* @return void
|
52 |
*/
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
?>
|
69 |
-
<div id="rtm-themes">
|
70 |
-
<div class="horizontal-tabs">
|
71 |
-
<dl class='tabs' data-tab>
|
72 |
-
<?php
|
73 |
-
$i = 1;
|
74 |
-
foreach ( $tabs as $tab ) {
|
75 |
-
$active_class = '';
|
76 |
-
if( $i == 1 ){
|
77 |
-
$active_class = 'active';
|
78 |
-
}
|
79 |
-
$i++;
|
80 |
-
?>
|
81 |
-
<dd class="<?php echo $active_class ?>">
|
82 |
-
<a id="tab-<?php echo substr ( $tab[ 'href' ], 1 ) ?>" title="<?php echo $tab[ 'title' ] ?>" href="<?php echo $tab[ 'href' ] ?>" class="rtmedia-tab-title <?php echo sanitize_title ( $tab[ 'name' ] ) ?>"><?php echo $tab[ 'name' ]?></a>
|
83 |
-
</dd>
|
84 |
-
<?php
|
85 |
-
}
|
86 |
-
?>
|
87 |
-
</dl>
|
88 |
-
|
89 |
-
<?php
|
90 |
-
$k = 1;
|
91 |
-
$active_class = '';
|
92 |
-
echo "<div class='tabs-content'>";
|
93 |
-
foreach ( $tabs as $tab ) {
|
94 |
-
$active_class = '';
|
95 |
-
if ( $k == 1 ){ $active_class = ' active';} $k++;
|
96 |
-
if ( isset ( $tab[ 'icon' ] ) && ! empty ( $tab[ 'icon' ] ) )
|
97 |
-
$icon = '<i class="' . $tab[ 'icon' ] . '"></i>';
|
98 |
-
$tab_without_hash = explode( "#", $tab[ 'href' ] );
|
99 |
-
$tab_without_hash = $tab_without_hash[1];
|
100 |
-
echo '<div class="content' . $active_class .'" id="' . $tab_without_hash . '">';
|
101 |
-
call_user_func( $tab['callback'] );
|
102 |
-
echo '</div>';
|
103 |
-
}
|
104 |
-
echo "</div>";
|
105 |
-
?>
|
106 |
-
</div>
|
107 |
</div>
|
108 |
-
|
109 |
-
|
|
|
110 |
|
111 |
/**
|
112 |
* Show rtmedia_themes_content.
|
113 |
*
|
114 |
* @access public
|
|
|
115 |
* @param void
|
|
|
116 |
* @return void
|
117 |
*/
|
118 |
-
public function rtmedia_themes_content()
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
</div>
|
136 |
-
</div>
|
137 |
</div>
|
138 |
-
</div>
|
139 |
<?php
|
140 |
}
|
141 |
|
@@ -143,41 +159,59 @@ class RTMediaThemes {
|
|
143 |
* Show rtmedia_3rd_party_themes_content.
|
144 |
*
|
145 |
* @access public
|
|
|
146 |
* @param void
|
|
|
147 |
* @return void
|
148 |
*/
|
149 |
-
public function rtmedia_3rd_party_themes_content()
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
154 |
</div>
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
</div>
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
</div>
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
179 |
</div>
|
180 |
-
</div>
|
181 |
<?php
|
182 |
}
|
183 |
}
|
17 |
* Render themes
|
18 |
*
|
19 |
* @access public
|
20 |
+
*
|
21 |
* @param type $page
|
22 |
+
*
|
23 |
* @return void
|
24 |
*/
|
25 |
+
public static function render_themes( $page = '' ){
|
26 |
+
global $wp_settings_sections, $wp_settings_fields;
|
27 |
|
28 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
29 |
+
return;
|
30 |
+
}
|
|
|
|
|
31 |
|
32 |
+
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
|
|
|
|
33 |
|
34 |
+
if ( $section['callback'] ){
|
35 |
+
call_user_func( $section['callback'], $section );
|
36 |
+
}
|
37 |
|
38 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
39 |
+
continue;
|
|
|
40 |
}
|
41 |
+
|
42 |
+
echo '<table class="form-table">';
|
43 |
+
do_settings_fields( $page, $section['id'] );
|
44 |
+
echo '</table>';
|
45 |
}
|
46 |
+
}
|
47 |
|
48 |
+
/**
|
49 |
* Get themes.
|
50 |
*
|
51 |
* @access public
|
52 |
+
*
|
53 |
* @param void
|
54 |
+
*
|
55 |
* @return void
|
56 |
*/
|
57 |
+
public function get_themes(){
|
58 |
+
$tabs = array();
|
59 |
+
global $rtmedia_admin;
|
60 |
+
$tabs[] = array(
|
61 |
+
'title' => __( 'rtMedia Themes By rtCamp', 'rtmedia' ),
|
62 |
+
'name' => __( 'rtMedia Themes By rtCamp', 'rtmedia' ),
|
63 |
+
'href' => '#rtmedia-themes',
|
64 |
+
'callback' => array( $this, 'rtmedia_themes_content' )
|
65 |
+
);
|
66 |
+
$tabs[] = array(
|
67 |
+
'title' => __( '3rd Party Themes', 'rtmedia' ),
|
68 |
+
'name' => __( '3rd Party Themes', 'rtmedia' ),
|
69 |
+
'href' => '#rtmedia-themes-3',
|
70 |
+
'callback' => array( $this, 'rtmedia_3rd_party_themes_content' )
|
71 |
+
);
|
72 |
+
?>
|
73 |
+
<div id="rtm-themes">
|
74 |
+
<div class="horizontal-tabs">
|
75 |
+
<dl class='tabs' data-tab>
|
76 |
+
<?php
|
77 |
+
$i = 1;
|
78 |
+
foreach ( $tabs as $tab ) {
|
79 |
+
$active_class = '';
|
80 |
+
if ( 1 == $i ){
|
81 |
+
$active_class = 'active';
|
82 |
+
}
|
83 |
+
$i ++;
|
84 |
+
?>
|
85 |
+
<dd class="<?php echo $active_class ?>">
|
86 |
+
<a id="tab-<?php echo substr( $tab['href'], 1 ) ?>" title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href'] ?>" class="rtmedia-tab-title <?php echo sanitize_title( $tab['name'] ) ?>"><?php echo $tab['name'] ?></a>
|
87 |
+
</dd>
|
88 |
+
<?php
|
89 |
+
}
|
90 |
+
?>
|
91 |
+
</dl>
|
92 |
+
|
93 |
+
<?php
|
94 |
+
$k = 1;
|
95 |
+
$active_class = '';
|
96 |
+
echo "<div class='tabs-content'>";
|
97 |
+
foreach ( $tabs as $tab ) {
|
98 |
+
$active_class = '';
|
99 |
+
if ( 1 == $k ){
|
100 |
+
$active_class = ' active';
|
101 |
+
}
|
102 |
+
$k ++;
|
103 |
+
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
104 |
+
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
105 |
+
}
|
106 |
+
$tab_without_hash = explode( '#', $tab['href'] );
|
107 |
+
$tab_without_hash = $tab_without_hash[1];
|
108 |
+
echo '<div class="content' . $active_class . '" id="' . $tab_without_hash . '">';
|
109 |
+
call_user_func( $tab['callback'] );
|
110 |
+
echo '</div>';
|
111 |
+
}
|
112 |
+
echo '</div>';
|
113 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
</div>
|
115 |
+
</div>
|
116 |
+
<?php
|
117 |
+
}
|
118 |
|
119 |
/**
|
120 |
* Show rtmedia_themes_content.
|
121 |
*
|
122 |
* @access public
|
123 |
+
*
|
124 |
* @param void
|
125 |
+
*
|
126 |
* @return void
|
127 |
*/
|
128 |
+
public function rtmedia_themes_content(){
|
129 |
+
?>
|
130 |
+
<div class="row">
|
131 |
+
<div class="columns large-12">
|
132 |
+
<div class="columns large-4 rtmedia-theme-image">
|
133 |
+
<a href="https://rtcamp.com/store/inspirebook/" target="_blank"><img src="<?php echo RTMEDIA_URL . 'app/assets/img/rtmedia-theme-InspireBook.png' ?>"/></a>
|
134 |
+
</div>
|
135 |
+
<div class="columns large-7 rtmedia-theme-content">
|
136 |
+
<h3 class="rtmedia-theme-title"><a href="https://rtcamp.com/store/inspirebook/" target="_blank">InspireBook</a>
|
137 |
+
</h3>
|
138 |
+
|
139 |
+
<div>
|
140 |
+
<p>
|
141 |
+
<span><a href="https://rtcamp.com/store/inspirebook/" target="_blank"><b>Meet InspireBook</b></a> - First official rtMedia premium theme.</span>
|
142 |
+
</p>
|
143 |
+
|
144 |
+
<p>
|
145 |
+
<span>InspireBook is a premium WordPress theme, designed especially for BuddyPress and rtMedia powered social-networks. <a href="https://rtcamp.com/introducing-inspirebook/" class="rtmedia-theme-inner-a" target="_blank">Read More</a> </span>
|
146 |
+
</p>
|
147 |
+
|
148 |
+
<p>
|
149 |
+
<span>Links: <a href="https://rtcamp.com/store/inspirebook/" target="_blank">Buy InspireBook</a> | <a href="http://demo.rtcamp.com/rtmedia/?theme=InspireBook" target="_blank">Live Demo</a> | <a href="https://rtcamp.com/docs/inspirebook/" target="_blank">Documentation</a> | <a href="https://rtcamp.com/support/forum/premium-themes/" target="_blank">Support Forum</a></span>
|
150 |
+
</p>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
</div>
|
|
|
154 |
</div>
|
|
|
155 |
<?php
|
156 |
}
|
157 |
|
159 |
* Show rtmedia_3rd_party_themes_content.
|
160 |
*
|
161 |
* @access public
|
162 |
+
*
|
163 |
* @param void
|
164 |
+
*
|
165 |
* @return void
|
166 |
*/
|
167 |
+
public function rtmedia_3rd_party_themes_content(){
|
168 |
+
?>
|
169 |
+
<div class="row">
|
170 |
+
<div class="columns large-12">
|
171 |
+
<h4 class="rtmedia-theme-warning"><?php _e( 'These are the third party themes. For any issues or queries regarding these themes please contact theme developers.', 'rtmedia' ) ?></h4>
|
172 |
+
</div>
|
173 |
</div>
|
174 |
+
<hr>
|
175 |
+
<div class="row">
|
176 |
+
<div class="columns large-4 rtmedia-theme-image">
|
177 |
+
<a href="http://rt.cx/sweetdate" target="_blank"><img src="<?php echo RTMEDIA_URL . 'app/assets/img/rtmedia-theme-sweetdate.png' ?>"/></a>
|
178 |
+
</div>
|
179 |
+
<div class="columns large-7">
|
180 |
+
<h3 class="rtmedia-theme-3rd-party-title"><a href="http://rt.cx/sweetdate" target="_blank">Sweet Date</a></h3>
|
181 |
+
|
182 |
+
<div>
|
183 |
+
<span><?php _e( 'SweetDate is a unique, clean and modern Premium Wordpress theme. It is perfect for a dating or community website but can be used as well for any other domain. They added all the things you need to create a perfect community system.', 'rtmedia' ); ?></span>
|
184 |
+
</div>
|
185 |
+
<div>
|
186 |
+
<h4><?php echo __( 'Click', 'rtmedia' ) . " <a href='http://rt.cx/sweetdate' target='_blank'>" . __( 'here', 'rtmedia' ) . '</a> ' . __( 'for preview.', 'rtmedia' ); ?></h4>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
</div>
|
190 |
+
<hr>
|
191 |
+
<div class="row">
|
192 |
+
<div class="columns large-4 rtmedia-theme-image">
|
193 |
+
<a href="http://rt.cx/kleo" target="_blank"><img src="<?php echo RTMEDIA_URL . 'app/assets/img/rtmedia-theme-kleo.png' ?>"/></a>
|
194 |
+
</div>
|
195 |
+
<div class="columns large-7">
|
196 |
+
<h3 class="rtmedia-theme-3rd-party-title"><a href="http://rt.cx/kleo" target="_blank">KLEO</a></h3>
|
197 |
+
|
198 |
+
<div>
|
199 |
+
<span><?php _e( 'You no longer need to be a professional developer or designer to create an awesome website. Let your imagination run wild and create the site of your dreams. KLEO has all the tools to get you started.', 'rtmedia' ); ?></span>
|
200 |
+
</div>
|
201 |
+
<div>
|
202 |
+
<h4><?php echo __( 'Click', 'rtmedia' ) . " <a href='http://rt.cx/kleo' target='_blank'>" . __( 'here', 'rtmedia' ) . '</a> ' . __( 'for preview.', 'rtmedia' ); ?></h4>
|
203 |
+
</div>
|
204 |
+
</div>
|
205 |
</div>
|
206 |
+
<hr>
|
207 |
+
<div class="row">
|
208 |
+
<div class="columns large-12">
|
209 |
+
<h3><?php _e( 'Are you a developer?', 'rtmedia' ); ?></h3>
|
210 |
+
|
211 |
+
<p><?php _e( 'If you have developed a rtMedia compatible theme and would like it to list here, please email us at', 'rtmedia' ) ?>
|
212 |
+
<a href="mailto:product@rtcamp.com"><?php _e( 'product@rtcamp.com', 'rtmedia' ) ?></a>.</p>
|
213 |
+
</div>
|
214 |
</div>
|
|
|
215 |
<?php
|
216 |
}
|
217 |
}
|
app/helper/RTMediaUploadException.php
CHANGED
@@ -20,10 +20,10 @@ class RTMediaUploadException extends Exception {
|
|
20 |
* @param type $code
|
21 |
* @param type $msg
|
22 |
*/
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
|
28 |
/**
|
29 |
* Error specific Message generated for the exception depending upon the code passed.
|
@@ -31,34 +31,36 @@ class RTMediaUploadException extends Exception {
|
|
31 |
*
|
32 |
* @param type $code
|
33 |
* @param type $msg
|
|
|
34 |
* @return type
|
35 |
*/
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
52 |
|
53 |
case $this->upload_err_invalid_context:
|
54 |
$message = apply_filters( 'rtmedia_invalid_context_error', __( 'Invalid Context for upload.', 'rtmedia' ) );
|
55 |
break;
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
}
|
20 |
* @param type $code
|
21 |
* @param type $msg
|
22 |
*/
|
23 |
+
public function __construct( $code, $msg = false ){
|
24 |
+
$message = $this->codeToMessage( $code, $msg );
|
25 |
+
parent::__construct( $message, $code );
|
26 |
+
}
|
27 |
|
28 |
/**
|
29 |
* Error specific Message generated for the exception depending upon the code passed.
|
31 |
*
|
32 |
* @param type $code
|
33 |
* @param type $msg
|
34 |
+
*
|
35 |
* @return type
|
36 |
*/
|
37 |
+
private function codeToMessage( $code, $msg ){
|
38 |
+
switch ( $code ) {
|
39 |
+
case UPLOAD_ERR_INI_SIZE:
|
40 |
+
case UPLOAD_ERR_FORM_SIZE:
|
41 |
+
$message = apply_filters( 'bp_media_file_size_error', __( 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', 'rtmedia' ) );
|
42 |
+
break;
|
43 |
+
case UPLOAD_ERR_NO_FILE:
|
44 |
+
$message = apply_filters( 'bp_media_file_null_error', __( 'No file was uploaded', 'rtmedia' ) );
|
45 |
+
break;
|
46 |
+
case UPLOAD_ERR_PARTIAL:
|
47 |
+
case UPLOAD_ERR_NO_TMP_DIR:
|
48 |
+
case UPLOAD_ERR_CANT_WRITE:
|
49 |
+
$message = apply_filters( 'bp_media_file_internal_error', __( 'Uploade failed due to internal server error.', 'rtmedia' ) );
|
50 |
+
break;
|
51 |
+
case UPLOAD_ERR_EXTENSION:
|
52 |
+
$message = apply_filters( 'bp_media_file_extension_error', __( 'File type not allowed.', 'rtmedia' ) );
|
53 |
+
break;
|
54 |
|
55 |
case $this->upload_err_invalid_context:
|
56 |
$message = apply_filters( 'rtmedia_invalid_context_error', __( 'Invalid Context for upload.', 'rtmedia' ) );
|
57 |
break;
|
58 |
+
default:
|
59 |
+
$msg = $msg ? $msg : __( 'Unknown file upload error.', 'rtmedia' );
|
60 |
+
$message = apply_filters( 'bp_media_file_unknown_error', $msg );
|
61 |
+
break;
|
62 |
+
}
|
63 |
|
64 |
+
return $message;
|
65 |
+
}
|
66 |
}
|
app/helper/db/RTDBModel.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author udit
|
8 |
*/
|
9 |
|
10 |
-
if( ! class_exists( 'RTDBModel' ) ){
|
11 |
class RTDBModel {
|
12 |
|
13 |
/**
|
@@ -15,7 +15,7 @@ if( ! class_exists( 'RTDBModel' ) ){
|
|
15 |
* @var type
|
16 |
*
|
17 |
* $table_name - database table linked to the model.
|
18 |
-
*
|
19 |
* $per_page - number of rows per page to be displayed
|
20 |
*/
|
21 |
public $table_name;
|
@@ -24,10 +24,10 @@ if( ! class_exists( 'RTDBModel' ) ){
|
|
24 |
|
25 |
/**
|
26 |
*
|
27 |
-
* @param string
|
28 |
* @param boolean $withprefix Set true if $tablename is with prefix otherwise it will prepend wordpress prefix with "rt_"
|
29 |
*/
|
30 |
-
function __construct( $table_name, $withprefix = false, $per_page = 10, $mu_single_table = false )
|
31 |
$this->mu_single_table = $mu_single_table;
|
32 |
$this->set_table_name( $table_name, $withprefix );
|
33 |
$this->set_per_page( $per_page );
|
@@ -35,167 +35,194 @@ if( ! class_exists( 'RTDBModel' ) ){
|
|
35 |
|
36 |
/**
|
37 |
*
|
38 |
-
* @global type
|
|
|
39 |
* @param string $table_name
|
40 |
-
* @param type
|
41 |
*/
|
42 |
-
public function set_table_name( $table_name, $withprefix = false )
|
43 |
global $wpdb;
|
44 |
if ( ! $withprefix ){
|
45 |
-
|
46 |
}
|
47 |
$this->table_name = $table_name;
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
* set number of rows per page for pagination
|
|
|
52 |
* @param type $per_page
|
53 |
*/
|
54 |
-
public function set_per_page( $per_page )
|
55 |
-
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
* Magic Method for getting DB rows by particular column.
|
60 |
* E.g., get_by_<columnName>(params)
|
|
|
61 |
* @global type $wpdb
|
62 |
-
*
|
63 |
-
* @param type
|
|
|
|
|
64 |
* @return type result array
|
65 |
*/
|
66 |
-
function __call( $name, $arguments )
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
103 |
} else {
|
104 |
return false;
|
105 |
}
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
114 |
}
|
115 |
|
116 |
/**
|
117 |
*
|
118 |
* @global type $wpdb
|
119 |
-
*
|
|
|
|
|
120 |
* @return type
|
121 |
*/
|
122 |
-
function insert( $row )
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
|
|
132 |
}
|
133 |
|
134 |
/**
|
135 |
*
|
136 |
* @global type $wpdb
|
137 |
-
*
|
138 |
-
* @param type
|
|
|
139 |
*/
|
140 |
-
function update( $data, $where )
|
141 |
-
|
142 |
-
|
|
|
143 |
}
|
144 |
|
145 |
/**
|
146 |
* Get all the rows according to the columns set in $columns parameter.
|
147 |
* offset and rows per page can also be passed for pagination.
|
|
|
148 |
* @global type $wpdb
|
149 |
-
*
|
|
|
|
|
150 |
* @return type
|
151 |
*/
|
152 |
-
function get( $columns, $offset=false, $per_page=false, $order_by= 'id desc' )
|
153 |
$select = "SELECT * FROM {$this->table_name}";
|
154 |
-
$where
|
155 |
foreach ( $columns as $colname => $colvalue ) {
|
156 |
-
if ( is_array
|
157 |
-
if ( ! isset
|
158 |
$compare = 'IN';
|
159 |
-
else
|
160 |
-
$compare = $colvalue[
|
161 |
-
if ( ! isset ( $colvalue[ 'value' ] ) ) {
|
162 |
-
$colvalue[ 'value' ] = $colvalue;
|
163 |
}
|
164 |
-
|
|
|
|
|
|
|
165 |
$where .= " AND {$this->table_name}.{$colname} {$compare} {$col_val_comapare}";
|
166 |
} else {
|
167 |
$where .= " AND {$this->table_name}.{$colname} = '{$colvalue}'";
|
168 |
}
|
169 |
}
|
170 |
-
$sql = $select . $where
|
171 |
|
172 |
$sql .= " ORDER BY {$this->table_name}.$order_by";
|
173 |
-
if(
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
|
185 |
}
|
186 |
global $wpdb;
|
|
|
187 |
return $wpdb->get_results( $sql );
|
188 |
}
|
189 |
|
190 |
/**
|
191 |
*
|
192 |
* @global type $wpdb
|
193 |
-
*
|
|
|
|
|
194 |
* @return type
|
195 |
*/
|
196 |
-
function delete( $where )
|
197 |
-
|
198 |
-
|
|
|
199 |
}
|
200 |
|
201 |
|
7 |
* @author udit
|
8 |
*/
|
9 |
|
10 |
+
if ( ! class_exists( 'RTDBModel' ) ){
|
11 |
class RTDBModel {
|
12 |
|
13 |
/**
|
15 |
* @var type
|
16 |
*
|
17 |
* $table_name - database table linked to the model.
|
18 |
+
* All the queries will be fired on that table or with the join in this table.
|
19 |
* $per_page - number of rows per page to be displayed
|
20 |
*/
|
21 |
public $table_name;
|
24 |
|
25 |
/**
|
26 |
*
|
27 |
+
* @param string $table_name Table name for model
|
28 |
* @param boolean $withprefix Set true if $tablename is with prefix otherwise it will prepend wordpress prefix with "rt_"
|
29 |
*/
|
30 |
+
function __construct( $table_name, $withprefix = false, $per_page = 10, $mu_single_table = false ){
|
31 |
$this->mu_single_table = $mu_single_table;
|
32 |
$this->set_table_name( $table_name, $withprefix );
|
33 |
$this->set_per_page( $per_page );
|
35 |
|
36 |
/**
|
37 |
*
|
38 |
+
* @global type $wpdb
|
39 |
+
*
|
40 |
* @param string $table_name
|
41 |
+
* @param type $withprefix
|
42 |
*/
|
43 |
+
public function set_table_name( $table_name, $withprefix = false ){
|
44 |
global $wpdb;
|
45 |
if ( ! $withprefix ){
|
46 |
+
$table_name = ( ( $this->mu_single_table ) ? $wpdb->base_prefix : $wpdb->prefix ) . 'rt_' . $table_name;
|
47 |
}
|
48 |
$this->table_name = $table_name;
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
* set number of rows per page for pagination
|
53 |
+
*
|
54 |
* @param type $per_page
|
55 |
*/
|
56 |
+
public function set_per_page( $per_page ){
|
57 |
+
$this->per_page = $per_page;
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
* Magic Method for getting DB rows by particular column.
|
62 |
* E.g., get_by_<columnName>(params)
|
63 |
+
*
|
64 |
* @global type $wpdb
|
65 |
+
*
|
66 |
+
* @param type $name - Added get_by_<coulmname>(value,pagging=true,page_no=1)
|
67 |
+
* @param type $arguments
|
68 |
+
*
|
69 |
* @return type result array
|
70 |
*/
|
71 |
+
function __call( $name, $arguments ){
|
72 |
+
$column_name = str_replace( 'get_by_', '', strtolower( $name ) );
|
73 |
+
$paging = false;
|
74 |
+
$page = 1;
|
75 |
+
if ( $arguments && ! empty( $arguments ) ){
|
76 |
+
if ( ! isset( $arguments[1] ) ){
|
77 |
+
$paging = true;
|
78 |
+
} else {
|
79 |
+
$paging = $arguments[1];
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( ! isset( $arguments[2] ) ){
|
83 |
+
$page = 1;
|
84 |
+
} else {
|
85 |
+
$page = $arguments[2];
|
86 |
+
}
|
87 |
+
|
88 |
+
$this->per_page = apply_filters( 'rt_db_model_per_page', $this->per_page, $this->table_name );
|
89 |
+
$return_array = array();
|
90 |
+
$return_array['result'] = false;
|
91 |
+
global $wpdb;
|
92 |
+
$return_array['total'] = intval( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM " . $this->table_name . " WHERE {$column_name} = %s", $arguments[0] ) ) );
|
93 |
+
if ( $return_array['total'] > 0 ){
|
94 |
+
$other = '';
|
95 |
+
if ( $paging ){
|
96 |
+
if ( intval( $this->per_page ) < 0 ){
|
97 |
+
$this->per_page = 1;
|
98 |
+
}
|
99 |
+
|
100 |
+
$offset = ( $page - 1 ) * $this->per_page;
|
101 |
+
|
102 |
+
if ( ! is_integer( $offset ) ){
|
103 |
+
$offset = 0;
|
104 |
+
}
|
105 |
+
if ( intval( $offset ) < 0 ){
|
106 |
+
$offset = 0;
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( $offset <= $return_array['total'] ){
|
110 |
+
$other = ' LIMIT ' . $offset . ',' . $this->per_page;
|
111 |
} else {
|
112 |
return false;
|
113 |
}
|
114 |
+
}
|
115 |
+
//echo $wpdb->prepare("SELECT * FROM " . $this->table_name . " WHERE {$column_name} = %s {$other}", $arguments[0]);
|
116 |
+
$return_array['result'] = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $this->table_name . " WHERE {$column_name} = %s {$other}", $arguments[0] ), ARRAY_A );
|
117 |
+
}
|
118 |
+
|
119 |
+
return $return_array;
|
120 |
+
} else {
|
121 |
+
return false;
|
122 |
+
}
|
123 |
}
|
124 |
|
125 |
/**
|
126 |
*
|
127 |
* @global type $wpdb
|
128 |
+
*
|
129 |
+
* @param type $row
|
130 |
+
*
|
131 |
* @return type
|
132 |
*/
|
133 |
+
function insert( $row ){
|
134 |
+
global $wpdb;
|
135 |
+
$insertdata = array();
|
136 |
+
foreach ( $row as $key => $val ) {
|
137 |
+
if ( $val != null ){
|
138 |
+
$insertdata[ $key ] = $val;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
$wpdb->insert( $this->table_name, $insertdata );
|
143 |
+
|
144 |
+
return $wpdb->insert_id;
|
145 |
}
|
146 |
|
147 |
/**
|
148 |
*
|
149 |
* @global type $wpdb
|
150 |
+
*
|
151 |
+
* @param type $data
|
152 |
+
* @param type $where
|
153 |
*/
|
154 |
+
function update( $data, $where ){
|
155 |
+
global $wpdb;
|
156 |
+
|
157 |
+
return $wpdb->update( $this->table_name, $data, $where );
|
158 |
}
|
159 |
|
160 |
/**
|
161 |
* Get all the rows according to the columns set in $columns parameter.
|
162 |
* offset and rows per page can also be passed for pagination.
|
163 |
+
*
|
164 |
* @global type $wpdb
|
165 |
+
*
|
166 |
+
* @param type $columns
|
167 |
+
*
|
168 |
* @return type
|
169 |
*/
|
170 |
+
function get( $columns, $offset = false, $per_page = false, $order_by = 'id desc' ){
|
171 |
$select = "SELECT * FROM {$this->table_name}";
|
172 |
+
$where = ' where 2=2 ';
|
173 |
foreach ( $columns as $colname => $colvalue ) {
|
174 |
+
if ( is_array( $colvalue ) ){
|
175 |
+
if ( ! isset( $colvalue['compare'] ) ){
|
176 |
$compare = 'IN';
|
177 |
+
} else {
|
178 |
+
$compare = $colvalue['compare'];
|
|
|
|
|
179 |
}
|
180 |
+
if ( ! isset( $colvalue['value'] ) ){
|
181 |
+
$colvalue['value'] = $colvalue;
|
182 |
+
}
|
183 |
+
$col_val_comapare = ( $colvalue['value'] ) ? '(\'' . implode( "','", $colvalue['value'] ) . '\')' : '';
|
184 |
$where .= " AND {$this->table_name}.{$colname} {$compare} {$col_val_comapare}";
|
185 |
} else {
|
186 |
$where .= " AND {$this->table_name}.{$colname} = '{$colvalue}'";
|
187 |
}
|
188 |
}
|
189 |
+
$sql = $select . $where;
|
190 |
|
191 |
$sql .= " ORDER BY {$this->table_name}.$order_by";
|
192 |
+
if ( false !== $offset ){
|
193 |
+
if ( ! is_integer( $offset ) ){
|
194 |
+
$offset = 0;
|
195 |
+
}
|
196 |
+
if ( intval( $offset ) < 0 ){
|
197 |
+
$offset = 0;
|
198 |
+
}
|
199 |
+
|
200 |
+
if ( ! is_integer( $per_page ) ){
|
201 |
+
$per_page = 0;
|
202 |
+
}
|
203 |
+
if ( intval( $per_page ) < 0 ){
|
204 |
+
$per_page = 1;
|
205 |
+
}
|
206 |
+
$sql .= ' LIMIT ' . $offset . ',' . $per_page;
|
207 |
|
208 |
}
|
209 |
global $wpdb;
|
210 |
+
|
211 |
return $wpdb->get_results( $sql );
|
212 |
}
|
213 |
|
214 |
/**
|
215 |
*
|
216 |
* @global type $wpdb
|
217 |
+
*
|
218 |
+
* @param type $where
|
219 |
+
*
|
220 |
* @return type
|
221 |
*/
|
222 |
+
function delete( $where ){
|
223 |
+
global $wpdb;
|
224 |
+
|
225 |
+
return $wpdb->delete( $this->table_name, $where );
|
226 |
}
|
227 |
|
228 |
|
app/helper/db/RTDBUpdate.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
/**
|
4 |
* Description of RTDBUpdate
|
5 |
* Required : rt_plugin_info.php
|
|
|
6 |
* @author udit
|
7 |
* version 1.1
|
8 |
*/
|
@@ -26,74 +27,82 @@ if ( ! class_exists( 'RTDBUpdate' ) ){
|
|
26 |
*
|
27 |
* @param type string $current_version Optional if not defined then will use plugin version
|
28 |
*/
|
29 |
-
public function __construct( $current_version = false, $plugin_path = false, $schema_path = false, $mu_single_table = false )
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
}
|
53 |
|
54 |
/**
|
55 |
* Create table using dbDelta.
|
56 |
*
|
57 |
* @access public
|
58 |
-
*
|
|
|
|
|
59 |
* @return void
|
60 |
*/
|
61 |
-
public function create_table( $sql )
|
62 |
-
|
63 |
-
|
64 |
}
|
65 |
|
66 |
/**
|
67 |
* Get db_version option name.
|
68 |
*
|
69 |
* @access public
|
|
|
70 |
* @param void
|
|
|
71 |
* @return string
|
72 |
*/
|
73 |
-
public function get_db_version_option_name()
|
74 |
-
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
* Get installed db_version.
|
79 |
*
|
80 |
* @access public
|
|
|
81 |
* @param void
|
|
|
82 |
* @return string
|
83 |
*/
|
84 |
-
public function get_install_db_version()
|
85 |
-
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
* Check upgrade by comparing version db_version.
|
90 |
*
|
91 |
* @access public
|
|
|
92 |
* @param void
|
|
|
93 |
* @return bool
|
94 |
*/
|
95 |
-
public function check_upgrade()
|
96 |
-
|
97 |
}
|
98 |
|
99 |
/**
|
@@ -101,42 +110,44 @@ if ( ! class_exists( 'RTDBUpdate' ) ){
|
|
101 |
* If db_version > install_db_version, then perform.
|
102 |
*
|
103 |
* @access public
|
|
|
104 |
* @param void
|
|
|
105 |
* @return void
|
106 |
*/
|
107 |
-
public function do_upgrade()
|
108 |
global $wpdb;
|
109 |
if ( version_compare( $this->db_version, $this->install_db_version, '>' ) ){
|
110 |
$path = $this->schema_path;
|
111 |
if ( $handle = opendir( $path ) ){
|
112 |
while ( false !== ( $entry = readdir( $handle ) ) ) {
|
113 |
-
if ( $entry !=
|
114 |
-
if ( strpos( $entry,
|
115 |
-
if( is_multisite() ){
|
116 |
-
$table_name
|
117 |
-
$check_table = "SHOW TABLES LIKE '%rt_" . $table_name."'";
|
118 |
-
$check_res
|
119 |
-
if( $check_res && sizeof( $check_res ) > 0 && is_array( $check_res ) && isset( $check_res[0][0] ) )
|
120 |
-
$tb_name
|
121 |
-
$table_name = ( ( $this->mu_single_table ) ? $wpdb->base_prefix : $wpdb->prefix ) .
|
122 |
-
if( $tb_name != $table_name ){
|
123 |
-
$alter_sql =
|
124 |
$wpdb->query( $alter_sql );
|
125 |
}
|
126 |
}
|
127 |
}
|
128 |
-
$this->create_table( $this->genrate_sql( $entry, file_get_contents( $path .
|
129 |
}
|
130 |
}
|
131 |
}
|
132 |
closedir( $handle );
|
133 |
}
|
134 |
if ( $this->mu_single_table ){
|
135 |
-
|
136 |
} else {
|
137 |
-
|
138 |
}
|
139 |
-
do_action(
|
140 |
}
|
141 |
}
|
142 |
|
@@ -144,41 +155,48 @@ if ( ! class_exists( 'RTDBUpdate' ) ){
|
|
144 |
* Check if table_exists.
|
145 |
*
|
146 |
* @access static
|
|
|
147 |
* @param string $table
|
|
|
148 |
* @return bool
|
149 |
*/
|
150 |
-
static function table_exists( $table )
|
151 |
-
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
-
|
158 |
}
|
159 |
|
160 |
/**
|
161 |
* Genrate sql query.
|
162 |
*
|
163 |
* @access public
|
|
|
164 |
* @param string $file_name
|
165 |
* @param string $file_content
|
|
|
166 |
* @return string sql query
|
167 |
*/
|
168 |
-
public function genrate_sql( $file_name, $file_content )
|
169 |
-
|
170 |
}
|
171 |
|
172 |
/**
|
173 |
* Genrate table_name.
|
174 |
*
|
175 |
* @access public
|
|
|
176 |
* @param string $file_name
|
|
|
177 |
* @return string
|
178 |
*/
|
179 |
-
public function genrate_table_name( $file_name )
|
180 |
-
|
181 |
-
|
|
|
182 |
}
|
183 |
|
184 |
}
|
3 |
/**
|
4 |
* Description of RTDBUpdate
|
5 |
* Required : rt_plugin_info.php
|
6 |
+
*
|
7 |
* @author udit
|
8 |
* version 1.1
|
9 |
*/
|
27 |
*
|
28 |
* @param type string $current_version Optional if not defined then will use plugin version
|
29 |
*/
|
30 |
+
public function __construct( $current_version = false, $plugin_path = false, $schema_path = false, $mu_single_table = false ){
|
31 |
+
|
32 |
+
if ( false != $schema_path ){
|
33 |
+
$this->schema_path = $schema_path;
|
34 |
+
} else {
|
35 |
+
$this->schema_path = realpath( dirname( __FILE__ ) . $this->schema_path );
|
36 |
+
}
|
37 |
+
|
38 |
+
if ( false != $plugin_path ){
|
39 |
+
$this->plugin_path = $plugin_path;
|
40 |
+
} else {
|
41 |
+
$this->plugin_path = realpath( dirname( __FILE__ ) . $this->plugin_path );
|
42 |
+
}
|
43 |
+
|
44 |
+
$this->mu_single_table = $mu_single_table;
|
45 |
+
|
46 |
+
$this->rt_plugin_info = new rt_plugin_info( $this->plugin_path );
|
47 |
+
if ( false == $current_version ){
|
48 |
+
$current_version = $this->rt_plugin_info->version;
|
49 |
+
}
|
50 |
+
$this->db_version = $current_version;
|
51 |
+
$this->db_version_option_name = $this->get_db_version_option_name();
|
52 |
+
$this->install_db_version = $this->get_install_db_version();
|
53 |
}
|
54 |
|
55 |
/**
|
56 |
* Create table using dbDelta.
|
57 |
*
|
58 |
* @access public
|
59 |
+
*
|
60 |
+
* @param string $sql
|
61 |
+
*
|
62 |
* @return void
|
63 |
*/
|
64 |
+
public function create_table( $sql ){
|
65 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
66 |
+
dbDelta( $sql );
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
* Get db_version option name.
|
71 |
*
|
72 |
* @access public
|
73 |
+
*
|
74 |
* @param void
|
75 |
+
*
|
76 |
* @return string
|
77 |
*/
|
78 |
+
public function get_db_version_option_name(){
|
79 |
+
return strtoupper( 'RT_' . str_replace( '-', '_', sanitize_title( $this->rt_plugin_info->name ) ) . '_DB_VERSIONS' );
|
80 |
}
|
81 |
|
82 |
/**
|
83 |
* Get installed db_version.
|
84 |
*
|
85 |
* @access public
|
86 |
+
*
|
87 |
* @param void
|
88 |
+
*
|
89 |
* @return string
|
90 |
*/
|
91 |
+
public function get_install_db_version(){
|
92 |
+
return ( $this->mu_single_table ) ? get_site_option( $this->db_version_option_name, '0.0' ) : get_option( $this->db_version_option_name, '0.0' );
|
93 |
}
|
94 |
|
95 |
/**
|
96 |
* Check upgrade by comparing version db_version.
|
97 |
*
|
98 |
* @access public
|
99 |
+
*
|
100 |
* @param void
|
101 |
+
*
|
102 |
* @return bool
|
103 |
*/
|
104 |
+
public function check_upgrade(){
|
105 |
+
return version_compare( $this->db_version, $this->install_db_version, '>' );
|
106 |
}
|
107 |
|
108 |
/**
|
110 |
* If db_version > install_db_version, then perform.
|
111 |
*
|
112 |
* @access public
|
113 |
+
*
|
114 |
* @param void
|
115 |
+
*
|
116 |
* @return void
|
117 |
*/
|
118 |
+
public function do_upgrade(){
|
119 |
global $wpdb;
|
120 |
if ( version_compare( $this->db_version, $this->install_db_version, '>' ) ){
|
121 |
$path = $this->schema_path;
|
122 |
if ( $handle = opendir( $path ) ){
|
123 |
while ( false !== ( $entry = readdir( $handle ) ) ) {
|
124 |
+
if ( $entry != '.' && $entry != '..' ){
|
125 |
+
if ( false !== strpos( $entry, '.schema' ) && file_exists( $path . '/' . $entry ) ){
|
126 |
+
if ( is_multisite() ){
|
127 |
+
$table_name = str_replace( '.schema', '', strtolower( $entry ) );
|
128 |
+
$check_table = "SHOW TABLES LIKE '%rt_" . $table_name . "'";
|
129 |
+
$check_res = $wpdb->get_results( $check_table, ARRAY_N );
|
130 |
+
if ( $check_res && sizeof( $check_res ) > 0 && is_array( $check_res ) && isset( $check_res[0][0] ) ){
|
131 |
+
$tb_name = $check_res[0][0];
|
132 |
+
$table_name = ( ( $this->mu_single_table ) ? $wpdb->base_prefix : $wpdb->prefix ) . 'rt_' . $table_name;
|
133 |
+
if ( $tb_name != $table_name ){
|
134 |
+
$alter_sql = 'ALTER TABLE ' . $tb_name . ' RENAME TO ' . $table_name;
|
135 |
$wpdb->query( $alter_sql );
|
136 |
}
|
137 |
}
|
138 |
}
|
139 |
+
$this->create_table( $this->genrate_sql( $entry, file_get_contents( $path . '/' . $entry ) ) );
|
140 |
}
|
141 |
}
|
142 |
}
|
143 |
closedir( $handle );
|
144 |
}
|
145 |
if ( $this->mu_single_table ){
|
146 |
+
update_site_option( $this->db_version_option_name, $this->db_version );
|
147 |
} else {
|
148 |
+
update_option( $this->db_version_option_name, $this->db_version );
|
149 |
}
|
150 |
+
do_action( 'rt_db_upgrade' );
|
151 |
}
|
152 |
}
|
153 |
|
155 |
* Check if table_exists.
|
156 |
*
|
157 |
* @access static
|
158 |
+
*
|
159 |
* @param string $table
|
160 |
+
*
|
161 |
* @return bool
|
162 |
*/
|
163 |
+
static function table_exists( $table ){
|
164 |
+
global $wpdb;
|
165 |
|
166 |
+
if ( 1 == $wpdb->query( "SHOW TABLES LIKE '" . $table . "'" ) ){
|
167 |
+
return true;
|
168 |
+
}
|
169 |
|
170 |
+
return false;
|
171 |
}
|
172 |
|
173 |
/**
|
174 |
* Genrate sql query.
|
175 |
*
|
176 |
* @access public
|
177 |
+
*
|
178 |
* @param string $file_name
|
179 |
* @param string $file_content
|
180 |
+
*
|
181 |
* @return string sql query
|
182 |
*/
|
183 |
+
public function genrate_sql( $file_name, $file_content ){
|
184 |
+
return sprintf( $file_content, $this->genrate_table_name( $file_name ) );
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
* Genrate table_name.
|
189 |
*
|
190 |
* @access public
|
191 |
+
*
|
192 |
* @param string $file_name
|
193 |
+
*
|
194 |
* @return string
|
195 |
*/
|
196 |
+
public function genrate_table_name( $file_name ){
|
197 |
+
global $wpdb;
|
198 |
+
|
199 |
+
return ( ( $this->mu_single_table ) ? $wpdb->base_prefix : $wpdb->prefix ) . 'rt_' . str_replace( '.schema', '', strtolower( $file_name ) );
|
200 |
}
|
201 |
|
202 |
}
|
app/helper/db/rt_plugin_info.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @author udit
|
7 |
*/
|
8 |
|
9 |
-
if( ! class_exists( 'rt_plugin_info' ) ){
|
10 |
class rt_plugin_info {
|
11 |
|
12 |
//put your code here
|
@@ -30,9 +30,9 @@ if( ! class_exists( 'rt_plugin_info' ) ){
|
|
30 |
* @param void
|
31 |
*
|
32 |
*/
|
33 |
-
public function __construct( $path =
|
34 |
-
|
35 |
-
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -43,8 +43,8 @@ if( ! class_exists( 'rt_plugin_info' ) ){
|
|
43 |
*
|
44 |
*/
|
45 |
public function get_plugin_data() {
|
46 |
-
|
47 |
-
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -55,17 +55,17 @@ if( ! class_exists( 'rt_plugin_info' ) ){
|
|
55 |
*
|
56 |
*/
|
57 |
public function set_plugin_data() {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
}
|
70 |
|
71 |
/**
|
@@ -76,10 +76,10 @@ if( ! class_exists( 'rt_plugin_info' ) ){
|
|
76 |
*
|
77 |
*/
|
78 |
public function set_current_plugin_path( $path ) {
|
79 |
-
if ( $path !=
|
80 |
-
|
81 |
} else {
|
82 |
-
|
83 |
}
|
84 |
}
|
85 |
|
6 |
* @author udit
|
7 |
*/
|
8 |
|
9 |
+
if ( ! class_exists( 'rt_plugin_info' ) ){
|
10 |
class rt_plugin_info {
|
11 |
|
12 |
//put your code here
|
30 |
* @param void
|
31 |
*
|
32 |
*/
|
33 |
+
public function __construct( $path = null ) {
|
34 |
+
$this->set_current_plugin_path( $path );
|
35 |
+
$this->set_plugin_data();
|
36 |
}
|
37 |
|
38 |
/**
|
43 |
*
|
44 |
*/
|
45 |
public function get_plugin_data() {
|
46 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
47 |
+
return @get_plugin_data( $this->plugin_path );
|
48 |
}
|
49 |
|
50 |
/**
|
55 |
*
|
56 |
*/
|
57 |
public function set_plugin_data() {
|
58 |
+
$this->plugin_data = $this->get_plugin_data();
|
59 |
+
$this->name = $this->plugin_data['Name'];
|
60 |
+
$this->title = $this->plugin_data['Title'];
|
61 |
+
$this->desctipriton = $this->plugin_data['Description'];
|
62 |
+
$this->author = $this->plugin_data['Author'];
|
63 |
+
$this->authoruri = $this->plugin_data['AuthorURI'];
|
64 |
+
$this->version = $this->plugin_data['Version'];
|
65 |
+
$this->pluginuri = $this->plugin_data['PluginURI'];
|
66 |
+
$this->textdomain = $this->plugin_data['TextDomain'];
|
67 |
+
$this->domain_path = $this->plugin_data['DomainPath'];
|
68 |
+
$this->network = $this->plugin_data['Network'];
|
69 |
}
|
70 |
|
71 |
/**
|
76 |
*
|
77 |
*/
|
78 |
public function set_current_plugin_path( $path ) {
|
79 |
+
if ( $path != null ){
|
80 |
+
$this->plugin_path = $path;
|
81 |
} else {
|
82 |
+
$this->plugin_path = realpath( plugin_dir_path( __FILE__ ) . '../../index.php' );
|
83 |
}
|
84 |
}
|
85 |
|
app/helper/rtDimensions.php
CHANGED
@@ -14,16 +14,18 @@ class rtDimensions extends rtForm {
|
|
14 |
|
15 |
private $element_id;
|
16 |
private static $id_count = 0;
|
17 |
-
private static $default_class =
|
18 |
|
19 |
/**
|
20 |
* Get default html id count.
|
21 |
*
|
22 |
* @access private
|
|
|
23 |
* @param void
|
|
|
24 |
* @return int $id_count
|
25 |
*/
|
26 |
-
private function get_default_id
|
27 |
return self::$id_count;
|
28 |
}
|
29 |
|
@@ -31,10 +33,12 @@ class rtDimensions extends rtForm {
|
|
31 |
* Update default html id count.
|
32 |
*
|
33 |
* @access private
|
|
|
34 |
* @param void
|
|
|
35 |
* @return int $id_count
|
36 |
*/
|
37 |
-
private function update_default_id
|
38 |
self::$id_count ++;
|
39 |
}
|
40 |
|
@@ -42,10 +46,12 @@ class rtDimensions extends rtForm {
|
|
42 |
* Get default html class.
|
43 |
*
|
44 |
* @access private
|
|
|
45 |
* @param void
|
|
|
46 |
* @return string $default_class
|
47 |
*/
|
48 |
-
private function get_default_class
|
49 |
return self::$default_class;
|
50 |
}
|
51 |
|
@@ -53,19 +59,21 @@ class rtDimensions extends rtForm {
|
|
53 |
* Embedd html class to html output.
|
54 |
*
|
55 |
* @access private
|
|
|
56 |
* @param string $element
|
57 |
* @param array $class
|
|
|
58 |
* @return string $html
|
59 |
*/
|
60 |
-
private function embedd_class
|
61 |
-
$html = 'class = "' . $this->get_default_class
|
62 |
|
63 |
-
if ( isset
|
64 |
|
65 |
-
if ( is_array
|
66 |
-
$html .= ' ' . implode
|
67 |
} else {
|
68 |
-
throw new rtFormsInvalidArgumentsException
|
69 |
}
|
70 |
}
|
71 |
$html .= '"';
|
@@ -77,61 +85,55 @@ class rtDimensions extends rtForm {
|
|
77 |
* Generate rtmedia dimensions in admin options.
|
78 |
*
|
79 |
* @access protected
|
80 |
-
*
|
|
|
|
|
81 |
* @return string $html
|
82 |
*/
|
83 |
-
protected function generate_dimensions
|
84 |
-
$element =
|
85 |
global $rtmedia;
|
86 |
$defaults = array(
|
87 |
-
|
88 |
-
'show_desc' => false
|
89 |
);
|
90 |
|
91 |
-
$attributes = wp_parse_args
|
92 |
-
extract
|
93 |
|
94 |
$html = '<div ';
|
95 |
|
96 |
-
if ( isset
|
97 |
-
$html .= 'id="' . $attributes[
|
98 |
} else {
|
99 |
-
$html .= 'id="' . $this->get_default_class
|
100 |
-
$this->update_default_id
|
101 |
}
|
102 |
|
103 |
-
if ( isset
|
104 |
-
$html .= self::embedd_class
|
105 |
} else {
|
106 |
-
$html .= self::embedd_class
|
107 |
}
|
108 |
$html .= '>';
|
109 |
|
110 |
-
$html .= parent::get_textbox
|
111 |
-
|
112 |
-
'value' => $width,
|
113 |
-
'class' => array( "small-text large-offset-1" ),
|
114 |
-
'show_desc' => $show_desc
|
115 |
) );
|
116 |
|
117 |
-
if ( isset
|
118 |
-
$html .= parent::get_textbox
|
119 |
-
|
120 |
-
'value' => $height,
|
121 |
-
'class' => array( "small-text large-offset-1" ),
|
122 |
-
'show_desc' => $show_desc
|
123 |
) );
|
124 |
}
|
125 |
|
126 |
-
if ( isset
|
127 |
-
$html .= parent::get_checkbox
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
'show_desc' => $show_desc
|
135 |
) );
|
136 |
}
|
137 |
|
@@ -141,8 +143,8 @@ class rtDimensions extends rtForm {
|
|
141 |
|
142 |
$html .= '</div>';
|
143 |
|
144 |
-
if ( isset
|
145 |
-
$html = parent::enclose_label
|
146 |
}
|
147 |
|
148 |
return $html;
|
@@ -152,11 +154,13 @@ class rtDimensions extends rtForm {
|
|
152 |
* Get rtmedia dimensions in admin options.
|
153 |
*
|
154 |
* @access public
|
155 |
-
*
|
|
|
|
|
156 |
* @return void
|
157 |
*/
|
158 |
-
public function get_dimensions
|
159 |
-
return $this->generate_dimensions
|
160 |
}
|
161 |
|
162 |
}
|
14 |
|
15 |
private $element_id;
|
16 |
private static $id_count = 0;
|
17 |
+
private static $default_class = 'rt-form-dimension';
|
18 |
|
19 |
/**
|
20 |
* Get default html id count.
|
21 |
*
|
22 |
* @access private
|
23 |
+
*
|
24 |
* @param void
|
25 |
+
*
|
26 |
* @return int $id_count
|
27 |
*/
|
28 |
+
private function get_default_id(){
|
29 |
return self::$id_count;
|
30 |
}
|
31 |
|
33 |
* Update default html id count.
|
34 |
*
|
35 |
* @access private
|
36 |
+
*
|
37 |
* @param void
|
38 |
+
*
|
39 |
* @return int $id_count
|
40 |
*/
|
41 |
+
private function update_default_id(){
|
42 |
self::$id_count ++;
|
43 |
}
|
44 |
|
46 |
* Get default html class.
|
47 |
*
|
48 |
* @access private
|
49 |
+
*
|
50 |
* @param void
|
51 |
+
*
|
52 |
* @return string $default_class
|
53 |
*/
|
54 |
+
private function get_default_class(){
|
55 |
return self::$default_class;
|
56 |
}
|
57 |
|
59 |
* Embedd html class to html output.
|
60 |
*
|
61 |
* @access private
|
62 |
+
*
|
63 |
* @param string $element
|
64 |
* @param array $class
|
65 |
+
*
|
66 |
* @return string $html
|
67 |
*/
|
68 |
+
private function embedd_class( $element, $class = null ){
|
69 |
+
$html = 'class = "' . $this->get_default_class();
|
70 |
|
71 |
+
if ( isset( $class ) ){
|
72 |
|
73 |
+
if ( is_array( $class ) ){
|
74 |
+
$html .= ' ' . implode( ' ', $class );
|
75 |
} else {
|
76 |
+
throw new rtFormsInvalidArgumentsException( 'class [' . $element . ']' );
|
77 |
}
|
78 |
}
|
79 |
$html .= '"';
|
85 |
* Generate rtmedia dimensions in admin options.
|
86 |
*
|
87 |
* @access protected
|
88 |
+
*
|
89 |
+
* @param array $attributes
|
90 |
+
*
|
91 |
* @return string $html
|
92 |
*/
|
93 |
+
protected function generate_dimensions( $attributes ){
|
94 |
+
$element = 'rtDimension';
|
95 |
global $rtmedia;
|
96 |
$defaults = array(
|
97 |
+
'desc' => '', 'show_desc' => false,
|
|
|
98 |
);
|
99 |
|
100 |
+
$attributes = wp_parse_args( $attributes, $defaults );
|
101 |
+
extract( $attributes );
|
102 |
|
103 |
$html = '<div ';
|
104 |
|
105 |
+
if ( isset( $attributes['id'] ) ){
|
106 |
+
$html .= 'id="' . $attributes['id'] . '" ';
|
107 |
} else {
|
108 |
+
$html .= 'id="' . $this->get_default_class() . '-' . $this->get_default_id() . '" ';
|
109 |
+
$this->update_default_id();
|
110 |
}
|
111 |
|
112 |
+
if ( isset( $attributes['class'] ) ){
|
113 |
+
$html .= self::embedd_class( $element, $attributes['class'] );
|
114 |
} else {
|
115 |
+
$html .= self::embedd_class( $element );
|
116 |
}
|
117 |
$html .= '>';
|
118 |
|
119 |
+
$html .= parent::get_textbox( array(
|
120 |
+
'name' => "rtmedia-options[{$key}_width]", 'value' => $width, 'class' => array( 'small-text large-offset-1' ), 'show_desc' => $show_desc,
|
|
|
|
|
|
|
121 |
) );
|
122 |
|
123 |
+
if ( isset( $height ) ){
|
124 |
+
$html .= parent::get_textbox( array(
|
125 |
+
'name' => "rtmedia-options[{$key}_height]", 'value' => $height, 'class' => array( 'small-text large-offset-1' ), 'show_desc' => $show_desc,
|
|
|
|
|
|
|
126 |
) );
|
127 |
}
|
128 |
|
129 |
+
if ( isset( $crop ) ){
|
130 |
+
$html .= parent::get_checkbox( array(
|
131 |
+
'name' => "rtmedia-options[{$key}_crop]", 'rtForm_options' => array(
|
132 |
+
array(
|
133 |
+
'' => 1, //label would be blank
|
134 |
+
'checked' => $crop,
|
135 |
+
),
|
136 |
+
), 'class' => array( 'large-offset-1' ), 'show_desc' => $show_desc,
|
|
|
137 |
) );
|
138 |
}
|
139 |
|
143 |
|
144 |
$html .= '</div>';
|
145 |
|
146 |
+
if ( isset( $attributes['label'] ) ){
|
147 |
+
$html = parent::enclose_label( 'container', $html, $attributes['label'] );
|
148 |
}
|
149 |
|
150 |
return $html;
|
154 |
* Get rtmedia dimensions in admin options.
|
155 |
*
|
156 |
* @access public
|
157 |
+
*
|
158 |
+
* @param mixed $attributes
|
159 |
+
*
|
160 |
* @return void
|
161 |
*/
|
162 |
+
public function get_dimensions( $attributes = '' ){
|
163 |
+
return $this->generate_dimensions( $attributes );
|
164 |
}
|
165 |
|
166 |
}
|
app/helper/rtForm.php
CHANGED
@@ -42,8 +42,6 @@
|
|
42 |
* "op3"=>3
|
43 |
* )
|
44 |
* ))."\n";
|
45 |
-
|
46 |
-
|
47 |
* ----checkbox test
|
48 |
* echo $obj->get_checkbox(array(
|
49 |
* "id"=>"myid",
|
@@ -55,7 +53,6 @@
|
|
55 |
* "op3"=>3
|
56 |
* )
|
57 |
* ))."\n";
|
58 |
-
|
59 |
* ----select test
|
60 |
* echo $obj->get_select(array(
|
61 |
* "id"=>"myid",
|
@@ -71,7 +68,7 @@
|
|
71 |
* @author udit
|
72 |
*/
|
73 |
|
74 |
-
if( ! class_exists(
|
75 |
|
76 |
class rtForm {
|
77 |
|
@@ -81,27 +78,27 @@ if( ! class_exists( "rtForm" ) ){
|
|
81 |
* if id for any element is not given then these count will be used in id generation
|
82 |
*/
|
83 |
private static $id_counts = array(
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
);
|
94 |
|
95 |
private static $default_classes = array(
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
);
|
106 |
|
107 |
|
@@ -109,33 +106,36 @@ if( ! class_exists( "rtForm" ) ){
|
|
109 |
* Get default html id.
|
110 |
*
|
111 |
* @access private
|
|
|
112 |
* @param string $element
|
113 |
*
|
114 |
*/
|
115 |
-
private function get_default_id( $element )
|
116 |
-
return self::$id_counts[$element];
|
117 |
}
|
118 |
|
119 |
/**
|
120 |
* Update default html id.
|
121 |
*
|
122 |
* @access private
|
|
|
123 |
* @param string $element
|
124 |
*
|
125 |
*/
|
126 |
-
private function update_default_id( $element )
|
127 |
-
self::$id_counts[$element] ++;
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
* Get default html class.
|
132 |
*
|
133 |
* @access private
|
|
|
134 |
* @param string $element
|
135 |
*
|
136 |
*/
|
137 |
-
private function get_default_class( $element )
|
138 |
-
return self::$default_classes[$element];
|
139 |
}
|
140 |
|
141 |
|
@@ -143,20 +143,22 @@ if( ! class_exists( "rtForm" ) ){
|
|
143 |
* Embedd html class to html output.
|
144 |
*
|
145 |
* @access private
|
|
|
146 |
* @param string $element
|
147 |
* @param array $class
|
|
|
148 |
* @return string $html
|
149 |
*/
|
150 |
-
private function embedd_class( $element, $class =
|
151 |
|
152 |
$html = 'class="' . $this->get_default_class( $element );
|
153 |
|
154 |
-
if( isset( $class ) ){
|
155 |
|
156 |
-
if( is_array( $class ) ){
|
157 |
-
$html .= ' ' . implode(
|
158 |
} else {
|
159 |
-
throw new rtFormInvalidArgumentsException(
|
160 |
}
|
161 |
}
|
162 |
$html .= '" ';
|
@@ -168,19 +170,21 @@ if( ! class_exists( "rtForm" ) ){
|
|
168 |
* Generate rtmedia html element id attribute in admin options.
|
169 |
*
|
170 |
* @access private
|
|
|
171 |
* @param string $element
|
172 |
* @param string $id
|
|
|
173 |
* @return string $html
|
174 |
*/
|
175 |
-
private function generate_element_id( $element, $id =
|
176 |
|
177 |
$html = 'id="';
|
178 |
-
if( isset( $id ) ){
|
179 |
$html .= $id . '"';
|
180 |
$this->element_id = $id;
|
181 |
} else {
|
182 |
-
$html .= $this->get_default_class( $element ) .
|
183 |
-
$this->element_id = $this->get_default_class( $element ) .
|
184 |
$this->update_default_id( $element );
|
185 |
}
|
186 |
|
@@ -191,20 +195,22 @@ if( ! class_exists( "rtForm" ) ){
|
|
191 |
* Generate rtmedia html name attribute in admin options.
|
192 |
*
|
193 |
* @access private
|
|
|
194 |
* @param string $element
|
195 |
* @param string $multiple
|
196 |
* @param string $name
|
|
|
197 |
* @return string $html
|
198 |
*/
|
199 |
-
private function generate_element_name( $element, $multiple, $name )
|
200 |
|
201 |
$html = 'name="';
|
202 |
-
if( $multiple ){
|
203 |
|
204 |
$html .= isset( $name ) ? $name . '[]' : $element . '[]';
|
205 |
|
206 |
// for select - add multiple = multiple
|
207 |
-
if(
|
208 |
$html .= 'multiple = "multiple"';
|
209 |
}
|
210 |
} else {
|
@@ -219,34 +225,37 @@ if( ! class_exists( "rtForm" ) ){
|
|
219 |
* Generate rtmedia html value attribute in admin options.
|
220 |
*
|
221 |
* @access private
|
|
|
222 |
* @param string $element
|
223 |
* @param mixed $attributes
|
|
|
224 |
* @return string $html
|
225 |
*/
|
226 |
-
private function generate_element_value( $element, $attributes )
|
227 |
|
228 |
$html = '';
|
229 |
-
switch( $element ) {
|
230 |
-
case
|
231 |
-
case
|
232 |
-
case
|
233 |
$html .= 'value="';
|
234 |
$html .= ( isset( $attributes['value'] ) ) ? $attributes['value'] : '';
|
235 |
$html .= '" ';
|
236 |
break;
|
237 |
|
238 |
-
case
|
239 |
/**textarea
|
240 |
* no process --- handled in between the start tab and end tag.
|
241 |
* <textarea> value </textarea>
|
242 |
*/
|
243 |
break;
|
244 |
|
245 |
-
case
|
246 |
-
case
|
247 |
$html .= 'value = "' . $attributes['value'] . '">';
|
248 |
break;
|
249 |
}
|
|
|
250 |
return $html;
|
251 |
}
|
252 |
|
@@ -254,32 +263,37 @@ if( ! class_exists( "rtForm" ) ){
|
|
254 |
* Generate rtmedia html element description in admin options.
|
255 |
*
|
256 |
* @access private
|
257 |
-
*
|
|
|
|
|
258 |
* @return string $html
|
259 |
*/
|
260 |
-
private function generate_element_desc( $attributes )
|
261 |
|
262 |
-
if( isset( $attributes['desc'] ) ){
|
263 |
|
264 |
$html = '<span class="clearfix large-offset-3 description">' . $attributes['desc'] . '</span>';
|
265 |
|
266 |
return $html;
|
267 |
}
|
268 |
|
269 |
-
return
|
270 |
}
|
271 |
|
272 |
/**
|
273 |
* Embedd html misc attributes in admin options.
|
274 |
*
|
275 |
* @access private
|
276 |
-
*
|
|
|
|
|
277 |
* @return string $html
|
278 |
*/
|
279 |
-
private function embedd_misc_attributes( $misc )
|
|
|
|
|
|
|
280 |
|
281 |
-
if( ! is_array( $misc ) ){
|
282 |
-
throw new rtFormInvalidArgumentsException( "attributes : misc" );
|
283 |
return;
|
284 |
}
|
285 |
|
@@ -296,15 +310,17 @@ if( ! class_exists( "rtForm" ) ){
|
|
296 |
* Process html attributes in admin options.
|
297 |
*
|
298 |
* @access private
|
|
|
299 |
* @param string $element
|
300 |
* @param mixed $attributes
|
301 |
* @param string $container
|
|
|
302 |
* @return string $html
|
303 |
*/
|
304 |
-
private function processAttributes( $element, $attributes, $container = false )
|
305 |
|
306 |
/* generating the id on its own if not provided otherwise taken from the parameter provided */
|
307 |
-
if( isset( $attributes['id'] ) ){
|
308 |
$html = $this->generate_element_id( $element, $attributes['id'] ) . ' ';
|
309 |
} else {
|
310 |
$html = $this->generate_element_id( $element ) . ' ';
|
@@ -312,24 +328,24 @@ if( ! class_exists( "rtForm" ) ){
|
|
312 |
|
313 |
/* name attrbute according to multiple flag */
|
314 |
$multiple = ( isset( $attributes['multiple'] ) && $attributes['multiple'] ) ? true : false;
|
315 |
-
$name
|
316 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
317 |
|
318 |
/*
|
319 |
* list down all the classes provided along with the default class of rtForms.
|
320 |
* default class of rtForms will always be attached irrespective of the attributes provided.
|
321 |
*/
|
322 |
-
if( ! $container ){
|
323 |
|
324 |
-
if( isset( $attributes['class'] ) ){
|
325 |
$html .= $this->embedd_class( $element, $attributes['class'] );
|
326 |
} else {
|
327 |
$html .= $this->embedd_class( $element );
|
328 |
}
|
329 |
}
|
330 |
|
331 |
-
if( isset( $attributes['misc'] ) ){
|
332 |
-
$html.= ' ' . $this->embedd_misc_attributes( $attributes['misc'] );
|
333 |
}
|
334 |
|
335 |
$html .= $this->generate_element_value( $element, $attributes );
|
@@ -341,80 +357,88 @@ if( ! class_exists( "rtForm" ) ){
|
|
341 |
* container enclosed elements in admin options.
|
342 |
*
|
343 |
* @access private
|
|
|
344 |
* @param string $element
|
345 |
* @param array $attrib
|
346 |
-
* @param int
|
|
|
347 |
* @return string $html
|
348 |
*/
|
349 |
-
private function container_enclosed_elements( $element, $attrib, $rtForm_options )
|
350 |
|
351 |
$html = '';
|
352 |
$size = count( $rtForm_options );
|
353 |
-
if( isset( $attrib['id'] ) ){
|
354 |
$id = $attrib['id'];
|
355 |
}
|
356 |
|
357 |
foreach ( $rtForm_options as $opt ) {
|
358 |
|
359 |
-
if( isset( $attrib['id'] ) && $size>1 ){
|
360 |
-
$attrib['id'] = $id .
|
361 |
$this->update_default_id( $element );
|
362 |
}
|
363 |
|
364 |
-
foreach ( (array)$opt as $key => $val ) {
|
365 |
|
366 |
-
if(
|
367 |
$attrib['checked'] = $val;
|
368 |
-
} else if( $key == "selected" ) {
|
369 |
-
$attrib['selected'] = $val;
|
370 |
-
} else if( $key == "desc" ) {
|
371 |
-
$attrib['desc'] = $val;
|
372 |
-
} else if( $key == "id" ) {
|
373 |
-
$attrib['id'] = $val;
|
374 |
} else {
|
375 |
-
|
376 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
}
|
379 |
|
380 |
-
$checked = ( isset( $attrib['checked'] ) && $attrib['checked'] ) ?
|
381 |
-
if( isset( $attrib['switch'] ) && $attrib['switch'] ){
|
382 |
$switch = 'data-toggle="switch"';
|
383 |
} else {
|
384 |
$switch = '';
|
385 |
}
|
386 |
|
387 |
-
switch( $element ) {
|
388 |
-
case
|
389 |
-
$data = '<input type="radio" ' . $checked .
|
390 |
break;
|
391 |
-
case
|
392 |
-
$data = '<input type="checkbox" ' . $checked .
|
393 |
break;
|
394 |
-
case
|
395 |
-
$selected = ( $attrib['selected'] ) ?
|
396 |
-
$data
|
397 |
break;
|
398 |
}
|
399 |
|
400 |
-
if(
|
401 |
$data .= $this->processAttributes( $element, $attrib, true );
|
402 |
|
403 |
-
if( isset( $attrib['switch_square'] ) && $attrib['switch_square'] ){
|
404 |
|
405 |
$data = '<div class="rt-switch switch-square" data-on-label="<i class=\'fui-check\'></i>" data-off-label="<i class=\'fui-cross\'></i>">' . $data . '</div>';
|
406 |
|
407 |
-
} else
|
408 |
-
|
409 |
|
410 |
-
|
411 |
-
|
|
|
|
|
|
|
412 |
} else {
|
413 |
$data = $this->enclose_label( $element, $data, $attrib['key'] );
|
414 |
}
|
415 |
-
|
416 |
-
} else {
|
417 |
-
$data = $this->enclose_label( $element, $data, $attrib['key'] );
|
418 |
}
|
419 |
|
420 |
$data .= '<br>';
|
@@ -426,6 +450,7 @@ if( ! class_exists( "rtForm" ) ){
|
|
426 |
unset( $attrib['key'] );
|
427 |
unset( $attrib['value'] );
|
428 |
}
|
|
|
429 |
return $html;
|
430 |
}
|
431 |
|
@@ -433,33 +458,34 @@ if( ! class_exists( "rtForm" ) ){
|
|
433 |
* Parse multiple options in admin options.
|
434 |
*
|
435 |
* @access private
|
|
|
436 |
* @param string $element
|
437 |
* @param array $attributes
|
438 |
*
|
439 |
*/
|
440 |
-
private function parse_multiple_options( $element, $attributes )
|
441 |
|
442 |
-
if( is_array( $attributes ) ){
|
443 |
|
444 |
-
if( isset( $attributes['rtForm_options'] ) && is_array( $attributes['rtForm_options'] ) ){
|
445 |
|
446 |
$attribKeys = array_keys( $attributes );
|
447 |
-
$attrib
|
448 |
|
449 |
foreach ( $attribKeys as $key ) {
|
450 |
-
if(
|
451 |
-
$attrib[$key] = $attributes[$key];
|
452 |
}
|
453 |
}
|
454 |
|
455 |
$rtForm_options = (array) $attributes['rtForm_options'];
|
456 |
|
457 |
-
return array( 'attrib' => $attrib, 'rtForm_options' => $rtForm_options );
|
458 |
} else {
|
459 |
-
throw new rtFormInvalidArgumentsException(
|
460 |
}
|
461 |
} else {
|
462 |
-
throw new rtFormInvalidArgumentsException(
|
463 |
}
|
464 |
}
|
465 |
|
@@ -467,22 +493,24 @@ if( ! class_exists( "rtForm" ) ){
|
|
467 |
* Enclose html label.
|
468 |
*
|
469 |
* @access protected
|
|
|
470 |
* @param string $element
|
471 |
* @param string $html
|
472 |
* @param string $label
|
473 |
* @param array $class
|
|
|
474 |
* @return string $data
|
475 |
*/
|
476 |
-
protected function enclose_label( $element, $html, $label, $class=false )
|
477 |
|
478 |
$labelClass = '';
|
479 |
-
if( ! empty( $class ) && is_array( $class ) ){
|
480 |
-
$labelClass = 'class="'.implode( ' ', $class ).'"';
|
481 |
}
|
482 |
|
483 |
-
$data = '<label for="' . $this->element_id . '" '
|
484 |
|
485 |
-
if(
|
486 |
$data .= $html . ' ' . $label;
|
487 |
} else {
|
488 |
$data .= $label . ' ' . $html;
|
@@ -497,13 +525,15 @@ if( ! class_exists( "rtForm" ) ){
|
|
497 |
* Generate rtmedia html textbox in admin options.
|
498 |
*
|
499 |
* @access protected
|
500 |
-
*
|
|
|
|
|
501 |
* @return string $html
|
502 |
*/
|
503 |
-
protected function generate_textbox( $attributes )
|
504 |
|
505 |
$element = 'rtText';
|
506 |
-
if( is_array( $attributes ) ){
|
507 |
|
508 |
/* Starting the input tag */
|
509 |
$html = '<input type="text" ';
|
@@ -514,21 +544,21 @@ if( ! class_exists( "rtForm" ) ){
|
|
514 |
/* ending the tag */
|
515 |
$html .= ' />';
|
516 |
|
517 |
-
if( isset( $attributes['label'] ) ){
|
518 |
-
if( isset( $attributes['labelClass'] ) ){
|
519 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
520 |
} else {
|
521 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
522 |
}
|
523 |
}
|
524 |
|
525 |
-
if( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
526 |
$html .= $this->generate_element_desc( $attributes );
|
527 |
}
|
528 |
|
529 |
return $html;
|
530 |
} else {
|
531 |
-
throw new rtFormInvalidArgumentsException(
|
532 |
}
|
533 |
}
|
534 |
|
@@ -536,10 +566,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
536 |
* Get rtmedia html textbox in admin options.
|
537 |
*
|
538 |
* @access public
|
539 |
-
*
|
|
|
|
|
540 |
* @return string
|
541 |
*/
|
542 |
-
public function get_textbox( $attributes = '' )
|
543 |
|
544 |
return $this->generate_textbox( $attributes );
|
545 |
}
|
@@ -548,47 +580,49 @@ if( ! class_exists( "rtForm" ) ){
|
|
548 |
* Generate rtmedia html number field in admin options.
|
549 |
*
|
550 |
* @access protected
|
551 |
-
*
|
|
|
|
|
552 |
* @return string $html
|
553 |
*/
|
554 |
-
protected function generate_number( $attributes )
|
555 |
|
556 |
$element = 'rtNumber';
|
557 |
-
if( is_array( $attributes ) ){
|
558 |
|
559 |
/* Starting the input tag */
|
560 |
$html = '<input type="number" ';
|
561 |
|
562 |
/* generating attributes */
|
563 |
$html .= $this->processAttributes( $element, $attributes );
|
564 |
-
if( isset( $attributes['min'] ) ){
|
565 |
-
|
566 |
}
|
567 |
-
if( isset( $attributes['max'] ) ){
|
568 |
-
|
569 |
}
|
570 |
-
if( isset( $attributes['step'] ) ){
|
571 |
-
|
572 |
}
|
573 |
-
|
574 |
/* ending the tag */
|
575 |
$html .= ' />';
|
576 |
|
577 |
-
if( isset( $attributes['label'] ) ){
|
578 |
-
if( isset( $attributes['labelClass'] ) ){
|
579 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
580 |
} else {
|
581 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
582 |
}
|
583 |
}
|
584 |
|
585 |
-
if( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
586 |
$html .= $this->generate_element_desc( $attributes );
|
587 |
}
|
588 |
|
589 |
return $html;
|
590 |
} else {
|
591 |
-
throw new rtFormInvalidArgumentsException(
|
592 |
}
|
593 |
}
|
594 |
|
@@ -596,10 +630,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
596 |
* Get rtmedia html number field in admin options.
|
597 |
*
|
598 |
* @access public
|
599 |
-
*
|
|
|
|
|
600 |
* @return string
|
601 |
*/
|
602 |
-
public function get_number( $attributes = '' )
|
603 |
|
604 |
return $this->generate_number( $attributes );
|
605 |
}
|
@@ -608,34 +644,36 @@ if( ! class_exists( "rtForm" ) ){
|
|
608 |
* Generate rtmedia html date field in admin options.
|
609 |
*
|
610 |
* @access protected
|
611 |
-
*
|
|
|
|
|
612 |
* @return string $html
|
613 |
*/
|
614 |
-
protected function generate_date( $attributes )
|
615 |
|
616 |
$element = 'rtDate';
|
617 |
-
if( is_array( $attributes ) ){
|
618 |
$html = '<input type="date" ';
|
619 |
|
620 |
$html .= $this->processAttributes( $element, $attributes );
|
621 |
|
622 |
$html .= ' />';
|
623 |
|
624 |
-
if( isset( $attributes['label'] ) ){
|
625 |
-
if( isset( $attributes['labelClass'] ) ){
|
626 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
627 |
} else {
|
628 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
629 |
}
|
630 |
}
|
631 |
|
632 |
-
if( isset( $attributes['show_desc'] ) && $attributes['desc'] ){
|
633 |
$html .= $this->generate_element_desc( $attributes );
|
634 |
}
|
635 |
|
636 |
return $html;
|
637 |
} else {
|
638 |
-
throw new rtFormInvalidArgumentsException(
|
639 |
}
|
640 |
}
|
641 |
|
@@ -643,10 +681,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
643 |
* Get rtmedia html date field in admin options.
|
644 |
*
|
645 |
* @access public
|
646 |
-
*
|
|
|
|
|
647 |
* @return string
|
648 |
*/
|
649 |
-
public function get_date( $attributes )
|
650 |
return $this->generate_date( $attributes );
|
651 |
}
|
652 |
|
@@ -654,13 +694,15 @@ if( ! class_exists( "rtForm" ) ){
|
|
654 |
* Generate rtmedia html hidden field in admin options.
|
655 |
*
|
656 |
* @access protected
|
657 |
-
*
|
|
|
|
|
658 |
* @return string $html
|
659 |
*/
|
660 |
-
protected function generate_hidden( $attributes )
|
661 |
|
662 |
$element = 'rtHidden';
|
663 |
-
if( is_array( $attributes ) ){
|
664 |
|
665 |
/* Starting the input tag */
|
666 |
$html = '<input type="hidden" ';
|
@@ -671,31 +713,34 @@ if( ! class_exists( "rtForm" ) ){
|
|
671 |
/* ending the tag */
|
672 |
$html .= ' />';
|
673 |
|
674 |
-
if( isset( $attributes['label'] ) ){
|
675 |
-
if( isset( $attributes['labelClass'] ) ){
|
676 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
677 |
} else {
|
678 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
679 |
}
|
680 |
}
|
681 |
|
682 |
-
if( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
683 |
$html .= $this->generate_element_desc( $attributes );
|
684 |
}
|
685 |
|
686 |
return $html;
|
687 |
-
} else
|
688 |
-
throw new rtFormInvalidArgumentsException(
|
|
|
689 |
}
|
690 |
|
691 |
/**
|
692 |
* Get rtmedia html hidden field in admin options.
|
693 |
*
|
694 |
* @access public
|
695 |
-
*
|
|
|
|
|
696 |
* @return string
|
697 |
*/
|
698 |
-
public function get_hidden( $attributes = '' )
|
699 |
|
700 |
return $this->generate_hidden( $attributes );
|
701 |
}
|
@@ -704,37 +749,39 @@ if( ! class_exists( "rtForm" ) ){
|
|
704 |
* Generate rtmedia html textarea in admin options.
|
705 |
*
|
706 |
* @access protected
|
707 |
-
*
|
|
|
|
|
708 |
* @return string $html
|
709 |
*/
|
710 |
-
protected function generate_textarea( $attributes )
|
711 |
|
712 |
$element = 'rtTextarea';
|
713 |
-
if( is_array( $attributes ) ){
|
714 |
|
715 |
$html = '<textarea ';
|
716 |
$html .= $this->processAttributes( $element, $attributes );
|
717 |
$html .= '>';
|
718 |
|
719 |
-
$html .= ( isset( $attributes['value'] ) ) ? $attributes['value'] :
|
720 |
|
721 |
$html .= '</textarea>';
|
722 |
|
723 |
-
if( isset( $attributes['label'] ) ){
|
724 |
-
if( isset( $attributes['labelClass'] ) ){
|
725 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
726 |
} else {
|
727 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
728 |
}
|
729 |
}
|
730 |
|
731 |
-
if( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
732 |
$html .= $this->generate_element_desc( $attributes );
|
733 |
}
|
734 |
|
735 |
return $html;
|
736 |
} else {
|
737 |
-
throw new rtFormInvalidArgumentsException(
|
738 |
}
|
739 |
}
|
740 |
|
@@ -742,10 +789,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
742 |
* Get rtmedia html textarea in admin options.
|
743 |
*
|
744 |
* @access public
|
745 |
-
*
|
|
|
|
|
746 |
* @return string
|
747 |
*/
|
748 |
-
public function get_textarea( $attributes = '' )
|
749 |
|
750 |
return $this->generate_textarea( $attributes );
|
751 |
}
|
@@ -759,54 +808,56 @@ if( ! class_exists( "rtForm" ) ){
|
|
759 |
* functionality and flow needs to be decided
|
760 |
*
|
761 |
* */
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
|
789 |
/**
|
790 |
* Generate rtmedia html input type radio in admin options.
|
791 |
*
|
792 |
* @access protected
|
793 |
-
*
|
|
|
|
|
794 |
* @return string $container
|
795 |
*/
|
796 |
-
protected function generate_radio( $attributes )
|
797 |
|
798 |
$element = 'rtRadio';
|
799 |
-
$html
|
800 |
|
801 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
802 |
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
803 |
|
804 |
-
if( isset($attributes['show_desc']) && $attributes['show_desc'] ){
|
805 |
$html .= $this->generate_element_desc( $attributes );
|
806 |
}
|
807 |
|
808 |
$container = '<span ';
|
809 |
-
if( isset( $attributes['class'] ) ){
|
810 |
$container .= $this->embedd_class( $element, $attributes['class'] );
|
811 |
} else {
|
812 |
$container .= $this->embedd_class( $element );
|
@@ -817,8 +868,8 @@ if( ! class_exists( "rtForm" ) ){
|
|
817 |
|
818 |
$container .= '</span>';
|
819 |
|
820 |
-
|
821 |
-
|
822 |
|
823 |
return $container;
|
824 |
}
|
@@ -827,10 +878,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
827 |
* Get rtmedia html input type radio in admin options.
|
828 |
*
|
829 |
* @access public
|
830 |
-
*
|
|
|
|
|
831 |
* @return string
|
832 |
*/
|
833 |
-
public function get_radio( $attributes = '' )
|
834 |
|
835 |
return $this->generate_radio( $attributes );
|
836 |
}
|
@@ -839,23 +892,25 @@ if( ! class_exists( "rtForm" ) ){
|
|
839 |
* Generate rtmedia html input type checkbox in admin options.
|
840 |
*
|
841 |
* @access protected
|
842 |
-
*
|
|
|
|
|
843 |
* @return string $container
|
844 |
*/
|
845 |
-
protected function generate_checkbox( $attributes )
|
846 |
|
847 |
$element = 'rtCheckbox';
|
848 |
-
$html
|
849 |
|
850 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
851 |
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
852 |
|
853 |
-
if( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
854 |
$html .= $this->generate_element_desc( $attributes );
|
855 |
}
|
856 |
|
857 |
$container = '<span ';
|
858 |
-
if( isset( $attributes['class'] ) ){
|
859 |
$container .= $this->embedd_class( $element, $attributes['class'] );
|
860 |
} else {
|
861 |
$container .= $this->embedd_class( $element );
|
@@ -866,8 +921,8 @@ if( ! class_exists( "rtForm" ) ){
|
|
866 |
|
867 |
$container .= '</span>';
|
868 |
|
869 |
-
|
870 |
-
|
871 |
|
872 |
return $container;
|
873 |
}
|
@@ -876,10 +931,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
876 |
* Get rtmedia html input type checkbox in admin options.
|
877 |
*
|
878 |
* @access public
|
879 |
-
*
|
|
|
|
|
880 |
* @return string
|
881 |
*/
|
882 |
-
public function get_checkbox( $attributes = '' )
|
883 |
|
884 |
return $this->generate_checkbox( $attributes );
|
885 |
}
|
@@ -888,12 +945,15 @@ if( ! class_exists( "rtForm" ) ){
|
|
888 |
* Get rtmedia html input type checkbox (get_switch) in admin options.
|
889 |
*
|
890 |
* @access public
|
891 |
-
*
|
|
|
|
|
892 |
* @return string
|
893 |
*/
|
894 |
-
public function get_switch( $attributes = '' )
|
895 |
|
896 |
$attributes['switch'] = true;
|
|
|
897 |
return $this->generate_checkbox( $attributes );
|
898 |
}
|
899 |
|
@@ -901,12 +961,15 @@ if( ! class_exists( "rtForm" ) ){
|
|
901 |
* Get rtmedia html input type checkbox (get_switch_square) in admin options.
|
902 |
*
|
903 |
* @access public
|
904 |
-
*
|
|
|
|
|
905 |
* @return string
|
906 |
*/
|
907 |
-
public function get_switch_square( $attributes = '' )
|
908 |
|
909 |
$attributes['switch_square'] = true;
|
|
|
910 |
return $this->generate_checkbox( $attributes );
|
911 |
}
|
912 |
|
@@ -914,33 +977,35 @@ if( ! class_exists( "rtForm" ) ){
|
|
914 |
* Generate rtmedia html input type select in admin options.
|
915 |
*
|
916 |
* @access protected
|
917 |
-
*
|
|
|
|
|
918 |
* @return string $html
|
919 |
*/
|
920 |
-
protected function generate_select( $attributes )
|
921 |
|
922 |
-
if( is_array( $attributes ) ){
|
923 |
$element = 'rtSelect';
|
924 |
-
$html
|
925 |
|
926 |
-
if( isset( $attributes['id'] ) ){
|
927 |
$id = $attributes['id'];
|
928 |
} else {
|
929 |
-
$id = $element
|
930 |
$this->update_default_id( $element );
|
931 |
}
|
932 |
$html .= $this->generate_element_id( $element, $id ) . ' ';
|
933 |
$multiple = ( isset( $attributes['multiple'] ) && $attributes['multiple'] ) ? true : false;
|
934 |
-
$name
|
935 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
936 |
-
if( isset( $attributes['class'] ) ){
|
937 |
$html .= $this->embedd_class( $element, $attributes['class'] );
|
938 |
} else {
|
939 |
$html .= $this->embedd_class( $element );
|
940 |
}
|
941 |
|
942 |
-
if( isset( $attributes['misc'] ) ){
|
943 |
-
$html.= ' ' . $this->embedd_misc_attributes( $attributes['misc'] );
|
944 |
}
|
945 |
|
946 |
$html .= '>';
|
@@ -950,21 +1015,21 @@ if( ! class_exists( "rtForm" ) ){
|
|
950 |
|
951 |
$html .= '</select>';
|
952 |
|
953 |
-
if( isset( $attributes['label'] ) ){
|
954 |
-
if( isset( $attributes['labelClass'] ) ){
|
955 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
956 |
} else {
|
957 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
958 |
}
|
959 |
}
|
960 |
|
961 |
-
if( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
962 |
$html .= $this->generate_element_desc( $attributes );
|
963 |
}
|
964 |
|
965 |
return $html;
|
966 |
} else {
|
967 |
-
throw new rtFormInvalidArgumentsException(
|
968 |
}
|
969 |
|
970 |
}
|
@@ -973,10 +1038,12 @@ if( ! class_exists( "rtForm" ) ){
|
|
973 |
* Get rtmedia html input type select in admin options.
|
974 |
*
|
975 |
* @access public
|
976 |
-
*
|
|
|
|
|
977 |
* @return string
|
978 |
*/
|
979 |
-
public function get_select( $attributes = '' )
|
980 |
|
981 |
return $this->generate_select( $attributes );
|
982 |
}
|
42 |
* "op3"=>3
|
43 |
* )
|
44 |
* ))."\n";
|
|
|
|
|
45 |
* ----checkbox test
|
46 |
* echo $obj->get_checkbox(array(
|
47 |
* "id"=>"myid",
|
53 |
* "op3"=>3
|
54 |
* )
|
55 |
* ))."\n";
|
|
|
56 |
* ----select test
|
57 |
* echo $obj->get_select(array(
|
58 |
* "id"=>"myid",
|
68 |
* @author udit
|
69 |
*/
|
70 |
|
71 |
+
if ( ! class_exists( 'rtForm' ) ){
|
72 |
|
73 |
class rtForm {
|
74 |
|
78 |
* if id for any element is not given then these count will be used in id generation
|
79 |
*/
|
80 |
private static $id_counts = array(
|
81 |
+
'rtText' => 0,
|
82 |
+
'rtNumber' => 0,
|
83 |
+
'rtDate' => 0,
|
84 |
+
'rtRadio' => 0,
|
85 |
+
'rtCheckbox' => 0,
|
86 |
+
'rtSelect' => 0,
|
87 |
+
'rtTextarea' => 0,
|
88 |
+
'rtHidden' => 0,
|
89 |
+
'rtWysiwyg' => 0,
|
90 |
);
|
91 |
|
92 |
private static $default_classes = array(
|
93 |
+
'rtText' => 'rt-form-text',
|
94 |
+
'rtNumber' => 'rt-form-number',
|
95 |
+
'rtDate' => 'rt-form-date',
|
96 |
+
'rtRadio' => 'rt-form-radio',
|
97 |
+
'rtCheckbox' => 'rt-form-checkbox',
|
98 |
+
'rtSelect' => 'rt-form-select',
|
99 |
+
'rtTextarea' => 'rt-form-textarea',
|
100 |
+
'rtHidden' => 'rt-form-hidden',
|
101 |
+
'rtWysiwyg' => 'rt-form-wysiwyg',
|
102 |
);
|
103 |
|
104 |
|
106 |
* Get default html id.
|
107 |
*
|
108 |
* @access private
|
109 |
+
*
|
110 |
* @param string $element
|
111 |
*
|
112 |
*/
|
113 |
+
private function get_default_id( $element ){
|
114 |
+
return self::$id_counts[ $element ];
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
* Update default html id.
|
119 |
*
|
120 |
* @access private
|
121 |
+
*
|
122 |
* @param string $element
|
123 |
*
|
124 |
*/
|
125 |
+
private function update_default_id( $element ){
|
126 |
+
self::$id_counts[ $element ] ++;
|
127 |
}
|
128 |
|
129 |
/**
|
130 |
* Get default html class.
|
131 |
*
|
132 |
* @access private
|
133 |
+
*
|
134 |
* @param string $element
|
135 |
*
|
136 |
*/
|
137 |
+
private function get_default_class( $element ){
|
138 |
+
return self::$default_classes[ $element ];
|
139 |
}
|
140 |
|
141 |
|
143 |
* Embedd html class to html output.
|
144 |
*
|
145 |
* @access private
|
146 |
+
*
|
147 |
* @param string $element
|
148 |
* @param array $class
|
149 |
+
*
|
150 |
* @return string $html
|
151 |
*/
|
152 |
+
private function embedd_class( $element, $class = null ){
|
153 |
|
154 |
$html = 'class="' . $this->get_default_class( $element );
|
155 |
|
156 |
+
if ( isset( $class ) ){
|
157 |
|
158 |
+
if ( is_array( $class ) ){
|
159 |
+
$html .= ' ' . implode( ' ', $class );
|
160 |
} else {
|
161 |
+
throw new rtFormInvalidArgumentsException( 'class [' . $element . ']' );
|
162 |
}
|
163 |
}
|
164 |
$html .= '" ';
|
170 |
* Generate rtmedia html element id attribute in admin options.
|
171 |
*
|
172 |
* @access private
|
173 |
+
*
|
174 |
* @param string $element
|
175 |
* @param string $id
|
176 |
+
*
|
177 |
* @return string $html
|
178 |
*/
|
179 |
+
private function generate_element_id( $element, $id = null ){
|
180 |
|
181 |
$html = 'id="';
|
182 |
+
if ( isset( $id ) ){
|
183 |
$html .= $id . '"';
|
184 |
$this->element_id = $id;
|
185 |
} else {
|
186 |
+
$html .= $this->get_default_class( $element ) . '-' . $this->get_default_id( $element ) . '"';
|
187 |
+
$this->element_id = $this->get_default_class( $element ) . '-' . $this->get_default_id( $element );
|
188 |
$this->update_default_id( $element );
|
189 |
}
|
190 |
|
195 |
* Generate rtmedia html name attribute in admin options.
|
196 |
*
|
197 |
* @access private
|
198 |
+
*
|
199 |
* @param string $element
|
200 |
* @param string $multiple
|
201 |
* @param string $name
|
202 |
+
*
|
203 |
* @return string $html
|
204 |
*/
|
205 |
+
private function generate_element_name( $element, $multiple, $name ){
|
206 |
|
207 |
$html = 'name="';
|
208 |
+
if ( $multiple ){
|
209 |
|
210 |
$html .= isset( $name ) ? $name . '[]' : $element . '[]';
|
211 |
|
212 |
// for select - add multiple = multiple
|
213 |
+
if ( 'rtSelect' == $element ){
|
214 |
$html .= 'multiple = "multiple"';
|
215 |
}
|
216 |
} else {
|
225 |
* Generate rtmedia html value attribute in admin options.
|
226 |
*
|
227 |
* @access private
|
228 |
+
*
|
229 |
* @param string $element
|
230 |
* @param mixed $attributes
|
231 |
+
*
|
232 |
* @return string $html
|
233 |
*/
|
234 |
+
private function generate_element_value( $element, $attributes ){
|
235 |
|
236 |
$html = '';
|
237 |
+
switch ( $element ) {
|
238 |
+
case 'rtHidden': //hidden
|
239 |
+
case 'rtNumber': //number
|
240 |
+
case 'rtText' : //text
|
241 |
$html .= 'value="';
|
242 |
$html .= ( isset( $attributes['value'] ) ) ? $attributes['value'] : '';
|
243 |
$html .= '" ';
|
244 |
break;
|
245 |
|
246 |
+
case 'rtTextarea' :
|
247 |
/**textarea
|
248 |
* no process --- handled in between the start tab and end tag.
|
249 |
* <textarea> value </textarea>
|
250 |
*/
|
251 |
break;
|
252 |
|
253 |
+
case 'rtCheckbox' : //checkbox
|
254 |
+
case 'rtRadio' : //radio
|
255 |
$html .= 'value = "' . $attributes['value'] . '">';
|
256 |
break;
|
257 |
}
|
258 |
+
|
259 |
return $html;
|
260 |
}
|
261 |
|
263 |
* Generate rtmedia html element description in admin options.
|
264 |
*
|
265 |
* @access private
|
266 |
+
*
|
267 |
+
* @param mixed $attributes
|
268 |
+
*
|
269 |
* @return string $html
|
270 |
*/
|
271 |
+
private function generate_element_desc( $attributes ){
|
272 |
|
273 |
+
if ( isset( $attributes['desc'] ) ){
|
274 |
|
275 |
$html = '<span class="clearfix large-offset-3 description">' . $attributes['desc'] . '</span>';
|
276 |
|
277 |
return $html;
|
278 |
}
|
279 |
|
280 |
+
return '';
|
281 |
}
|
282 |
|
283 |
/**
|
284 |
* Embedd html misc attributes in admin options.
|
285 |
*
|
286 |
* @access private
|
287 |
+
*
|
288 |
+
* @param mixed $misc
|
289 |
+
*
|
290 |
* @return string $html
|
291 |
*/
|
292 |
+
private function embedd_misc_attributes( $misc ){
|
293 |
+
|
294 |
+
if ( ! is_array( $misc ) ){
|
295 |
+
throw new rtFormInvalidArgumentsException( 'attributes : misc' );
|
296 |
|
|
|
|
|
297 |
return;
|
298 |
}
|
299 |
|
310 |
* Process html attributes in admin options.
|
311 |
*
|
312 |
* @access private
|
313 |
+
*
|
314 |
* @param string $element
|
315 |
* @param mixed $attributes
|
316 |
* @param string $container
|
317 |
+
*
|
318 |
* @return string $html
|
319 |
*/
|
320 |
+
private function processAttributes( $element, $attributes, $container = false ){
|
321 |
|
322 |
/* generating the id on its own if not provided otherwise taken from the parameter provided */
|
323 |
+
if ( isset( $attributes['id'] ) ){
|
324 |
$html = $this->generate_element_id( $element, $attributes['id'] ) . ' ';
|
325 |
} else {
|
326 |
$html = $this->generate_element_id( $element ) . ' ';
|
328 |
|
329 |
/* name attrbute according to multiple flag */
|
330 |
$multiple = ( isset( $attributes['multiple'] ) && $attributes['multiple'] ) ? true : false;
|
331 |
+
$name = ( isset( $attributes['name'] ) ) ? $attributes['name'] : $element;
|
332 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
333 |
|
334 |
/*
|
335 |
* list down all the classes provided along with the default class of rtForms.
|
336 |
* default class of rtForms will always be attached irrespective of the attributes provided.
|
337 |
*/
|
338 |
+
if ( ! $container ){
|
339 |
|
340 |
+
if ( isset( $attributes['class'] ) ){
|
341 |
$html .= $this->embedd_class( $element, $attributes['class'] );
|
342 |
} else {
|
343 |
$html .= $this->embedd_class( $element );
|
344 |
}
|
345 |
}
|
346 |
|
347 |
+
if ( isset( $attributes['misc'] ) ){
|
348 |
+
$html .= ' ' . $this->embedd_misc_attributes( $attributes['misc'] );
|
349 |
}
|
350 |
|
351 |
$html .= $this->generate_element_value( $element, $attributes );
|
357 |
* container enclosed elements in admin options.
|
358 |
*
|
359 |
* @access private
|
360 |
+
*
|
361 |
* @param string $element
|
362 |
* @param array $attrib
|
363 |
+
* @param int $rtForm_options
|
364 |
+
*
|
365 |
* @return string $html
|
366 |
*/
|
367 |
+
private function container_enclosed_elements( $element, $attrib, $rtForm_options ){
|
368 |
|
369 |
$html = '';
|
370 |
$size = count( $rtForm_options );
|
371 |
+
if ( isset( $attrib['id'] ) ){
|
372 |
$id = $attrib['id'];
|
373 |
}
|
374 |
|
375 |
foreach ( $rtForm_options as $opt ) {
|
376 |
|
377 |
+
if ( isset( $attrib['id'] ) && $size > 1 ){
|
378 |
+
$attrib['id'] = $id . '-' . $this->get_default_id( $element );
|
379 |
$this->update_default_id( $element );
|
380 |
}
|
381 |
|
382 |
+
foreach ( (array) $opt as $key => $val ) {
|
383 |
|
384 |
+
if ( 'checked' == $key ){
|
385 |
$attrib['checked'] = $val;
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
} else {
|
387 |
+
if ( 'selected' == $key ){
|
388 |
+
$attrib['selected'] = $val;
|
389 |
+
} else {
|
390 |
+
if ( 'desc' == $key ){
|
391 |
+
$attrib['desc'] = $val;
|
392 |
+
} else {
|
393 |
+
if ( 'id' == $key ){
|
394 |
+
$attrib['id'] = $val;
|
395 |
+
} else {
|
396 |
+
$attrib['key'] = $key;
|
397 |
+
$attrib['value'] = $val;
|
398 |
+
}
|
399 |
+
}
|
400 |
+
}
|
401 |
}
|
402 |
}
|
403 |
|
404 |
+
$checked = ( isset( $attrib['checked'] ) && $attrib['checked'] ) ? 'checked=checked' : '';
|
405 |
+
if ( isset( $attrib['switch'] ) && $attrib['switch'] ){
|
406 |
$switch = 'data-toggle="switch"';
|
407 |
} else {
|
408 |
$switch = '';
|
409 |
}
|
410 |
|
411 |
+
switch ( $element ) {
|
412 |
+
case 'rtRadio' :
|
413 |
+
$data = '<input type="radio" ' . $checked . ' ';
|
414 |
break;
|
415 |
+
case 'rtCheckbox' :
|
416 |
+
$data = '<input type="checkbox" ' . $checked . ' ' . $switch . ' ';
|
417 |
break;
|
418 |
+
case 'rtSelect' :
|
419 |
+
$selected = ( $attrib['selected'] ) ? 'selected=selected' : '';
|
420 |
+
$data = '<option value="' . $attrib['value'] . '"' . $selected . '>' . $attrib['key'] . '</option><br />';
|
421 |
break;
|
422 |
}
|
423 |
|
424 |
+
if ( 'rtSelect' != $element ){
|
425 |
$data .= $this->processAttributes( $element, $attrib, true );
|
426 |
|
427 |
+
if ( isset( $attrib['switch_square'] ) && $attrib['switch_square'] ){
|
428 |
|
429 |
$data = '<div class="rt-switch switch-square" data-on-label="<i class=\'fui-check\'></i>" data-off-label="<i class=\'fui-cross\'></i>">' . $data . '</div>';
|
430 |
|
431 |
+
} else {
|
432 |
+
if ( ( isset( $attrib['switch'] ) && $attrib['switch'] ) || ( isset( $attrib['switch_square'] ) && $attrib['switch_square'] ) ){
|
433 |
|
434 |
+
if ( $size > 1 ){
|
435 |
+
$data = '<div>' . $this->enclose_label( $element, $data, $attrib['key'] ) . '</div>';
|
436 |
+
} else {
|
437 |
+
$data = $this->enclose_label( $element, $data, $attrib['key'] );
|
438 |
+
}
|
439 |
} else {
|
440 |
$data = $this->enclose_label( $element, $data, $attrib['key'] );
|
441 |
}
|
|
|
|
|
|
|
442 |
}
|
443 |
|
444 |
$data .= '<br>';
|
450 |
unset( $attrib['key'] );
|
451 |
unset( $attrib['value'] );
|
452 |
}
|
453 |
+
|
454 |
return $html;
|
455 |
}
|
456 |
|
458 |
* Parse multiple options in admin options.
|
459 |
*
|
460 |
* @access private
|
461 |
+
*
|
462 |
* @param string $element
|
463 |
* @param array $attributes
|
464 |
*
|
465 |
*/
|
466 |
+
private function parse_multiple_options( $element, $attributes ){
|
467 |
|
468 |
+
if ( is_array( $attributes ) ){
|
469 |
|
470 |
+
if ( isset( $attributes['rtForm_options'] ) && is_array( $attributes['rtForm_options'] ) ){
|
471 |
|
472 |
$attribKeys = array_keys( $attributes );
|
473 |
+
$attrib = array();
|
474 |
|
475 |
foreach ( $attribKeys as $key ) {
|
476 |
+
if ( 'rtForm_options' != $key ){
|
477 |
+
$attrib[ $key ] = $attributes[ $key ];
|
478 |
}
|
479 |
}
|
480 |
|
481 |
$rtForm_options = (array) $attributes['rtForm_options'];
|
482 |
|
483 |
+
return array( 'attrib' => $attrib, 'rtForm_options' => $rtForm_options, );
|
484 |
} else {
|
485 |
+
throw new rtFormInvalidArgumentsException( 'rtForm_options [' . $element . ']' );
|
486 |
}
|
487 |
} else {
|
488 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
489 |
}
|
490 |
}
|
491 |
|
493 |
* Enclose html label.
|
494 |
*
|
495 |
* @access protected
|
496 |
+
*
|
497 |
* @param string $element
|
498 |
* @param string $html
|
499 |
* @param string $label
|
500 |
* @param array $class
|
501 |
+
*
|
502 |
* @return string $data
|
503 |
*/
|
504 |
+
protected function enclose_label( $element, $html, $label, $class = false ){
|
505 |
|
506 |
$labelClass = '';
|
507 |
+
if ( ! empty( $class ) && is_array( $class ) ){
|
508 |
+
$labelClass = 'class="' . implode( ' ', $class ) . '"';
|
509 |
}
|
510 |
|
511 |
+
$data = '<label for="' . $this->element_id . '" ' . $labelClass . '>';
|
512 |
|
513 |
+
if ( 'rtRadio' == $element || 'rtCheckbox' == $element ){
|
514 |
$data .= $html . ' ' . $label;
|
515 |
} else {
|
516 |
$data .= $label . ' ' . $html;
|
525 |
* Generate rtmedia html textbox in admin options.
|
526 |
*
|
527 |
* @access protected
|
528 |
+
*
|
529 |
+
* @param array $attributes
|
530 |
+
*
|
531 |
* @return string $html
|
532 |
*/
|
533 |
+
protected function generate_textbox( $attributes ){
|
534 |
|
535 |
$element = 'rtText';
|
536 |
+
if ( is_array( $attributes ) ){
|
537 |
|
538 |
/* Starting the input tag */
|
539 |
$html = '<input type="text" ';
|
544 |
/* ending the tag */
|
545 |
$html .= ' />';
|
546 |
|
547 |
+
if ( isset( $attributes['label'] ) ){
|
548 |
+
if ( isset( $attributes['labelClass'] ) ){
|
549 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
550 |
} else {
|
551 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
552 |
}
|
553 |
}
|
554 |
|
555 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
556 |
$html .= $this->generate_element_desc( $attributes );
|
557 |
}
|
558 |
|
559 |
return $html;
|
560 |
} else {
|
561 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
562 |
}
|
563 |
}
|
564 |
|
566 |
* Get rtmedia html textbox in admin options.
|
567 |
*
|
568 |
* @access public
|
569 |
+
*
|
570 |
+
* @param array $attributes
|
571 |
+
*
|
572 |
* @return string
|
573 |
*/
|
574 |
+
public function get_textbox( $attributes = '' ){
|
575 |
|
576 |
return $this->generate_textbox( $attributes );
|
577 |
}
|
580 |
* Generate rtmedia html number field in admin options.
|
581 |
*
|
582 |
* @access protected
|
583 |
+
*
|
584 |
+
* @param array $attributes
|
585 |
+
*
|
586 |
* @return string $html
|
587 |
*/
|
588 |
+
protected function generate_number( $attributes ){
|
589 |
|
590 |
$element = 'rtNumber';
|
591 |
+
if ( is_array( $attributes ) ){
|
592 |
|
593 |
/* Starting the input tag */
|
594 |
$html = '<input type="number" ';
|
595 |
|
596 |
/* generating attributes */
|
597 |
$html .= $this->processAttributes( $element, $attributes );
|
598 |
+
if ( isset( $attributes['min'] ) ){
|
599 |
+
$html .= " min='" . $attributes['min'] . "' ";
|
600 |
}
|
601 |
+
if ( isset( $attributes['max'] ) ){
|
602 |
+
$html .= " max='" . $attributes['max'] . "' ";
|
603 |
}
|
604 |
+
if ( isset( $attributes['step'] ) ){
|
605 |
+
$html .= " step='" . $attributes['step'] . "' ";
|
606 |
}
|
607 |
+
|
608 |
/* ending the tag */
|
609 |
$html .= ' />';
|
610 |
|
611 |
+
if ( isset( $attributes['label'] ) ){
|
612 |
+
if ( isset( $attributes['labelClass'] ) ){
|
613 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
614 |
} else {
|
615 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
616 |
}
|
617 |
}
|
618 |
|
619 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
620 |
$html .= $this->generate_element_desc( $attributes );
|
621 |
}
|
622 |
|
623 |
return $html;
|
624 |
} else {
|
625 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
626 |
}
|
627 |
}
|
628 |
|
630 |
* Get rtmedia html number field in admin options.
|
631 |
*
|
632 |
* @access public
|
633 |
+
*
|
634 |
+
* @param array $attributes
|
635 |
+
*
|
636 |
* @return string
|
637 |
*/
|
638 |
+
public function get_number( $attributes = '' ){
|
639 |
|
640 |
return $this->generate_number( $attributes );
|
641 |
}
|
644 |
* Generate rtmedia html date field in admin options.
|
645 |
*
|
646 |
* @access protected
|
647 |
+
*
|
648 |
+
* @param array $attributes
|
649 |
+
*
|
650 |
* @return string $html
|
651 |
*/
|
652 |
+
protected function generate_date( $attributes ){
|
653 |
|
654 |
$element = 'rtDate';
|
655 |
+
if ( is_array( $attributes ) ){
|
656 |
$html = '<input type="date" ';
|
657 |
|
658 |
$html .= $this->processAttributes( $element, $attributes );
|
659 |
|
660 |
$html .= ' />';
|
661 |
|
662 |
+
if ( isset( $attributes['label'] ) ){
|
663 |
+
if ( isset( $attributes['labelClass'] ) ){
|
664 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
665 |
} else {
|
666 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
667 |
}
|
668 |
}
|
669 |
|
670 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['desc'] ){
|
671 |
$html .= $this->generate_element_desc( $attributes );
|
672 |
}
|
673 |
|
674 |
return $html;
|
675 |
} else {
|
676 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
677 |
}
|
678 |
}
|
679 |
|
681 |
* Get rtmedia html date field in admin options.
|
682 |
*
|
683 |
* @access public
|
684 |
+
*
|
685 |
+
* @param array $attributes
|
686 |
+
*
|
687 |
* @return string
|
688 |
*/
|
689 |
+
public function get_date( $attributes ){
|
690 |
return $this->generate_date( $attributes );
|
691 |
}
|
692 |
|
694 |
* Generate rtmedia html hidden field in admin options.
|
695 |
*
|
696 |
* @access protected
|
697 |
+
*
|
698 |
+
* @param array $attributes
|
699 |
+
*
|
700 |
* @return string $html
|
701 |
*/
|
702 |
+
protected function generate_hidden( $attributes ){
|
703 |
|
704 |
$element = 'rtHidden';
|
705 |
+
if ( is_array( $attributes ) ){
|
706 |
|
707 |
/* Starting the input tag */
|
708 |
$html = '<input type="hidden" ';
|
713 |
/* ending the tag */
|
714 |
$html .= ' />';
|
715 |
|
716 |
+
if ( isset( $attributes['label'] ) ){
|
717 |
+
if ( isset( $attributes['labelClass'] ) ){
|
718 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
719 |
} else {
|
720 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
721 |
}
|
722 |
}
|
723 |
|
724 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
725 |
$html .= $this->generate_element_desc( $attributes );
|
726 |
}
|
727 |
|
728 |
return $html;
|
729 |
+
} else {
|
730 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
731 |
+
}
|
732 |
}
|
733 |
|
734 |
/**
|
735 |
* Get rtmedia html hidden field in admin options.
|
736 |
*
|
737 |
* @access public
|
738 |
+
*
|
739 |
+
* @param array $attributes
|
740 |
+
*
|
741 |
* @return string
|
742 |
*/
|
743 |
+
public function get_hidden( $attributes = '' ){
|
744 |
|
745 |
return $this->generate_hidden( $attributes );
|
746 |
}
|
749 |
* Generate rtmedia html textarea in admin options.
|
750 |
*
|
751 |
* @access protected
|
752 |
+
*
|
753 |
+
* @param array $attributes
|
754 |
+
*
|
755 |
* @return string $html
|
756 |
*/
|
757 |
+
protected function generate_textarea( $attributes ){
|
758 |
|
759 |
$element = 'rtTextarea';
|
760 |
+
if ( is_array( $attributes ) ){
|
761 |
|
762 |
$html = '<textarea ';
|
763 |
$html .= $this->processAttributes( $element, $attributes );
|
764 |
$html .= '>';
|
765 |
|
766 |
+
$html .= ( isset( $attributes['value'] ) ) ? $attributes['value'] : '';
|
767 |
|
768 |
$html .= '</textarea>';
|
769 |
|
770 |
+
if ( isset( $attributes['label'] ) ){
|
771 |
+
if ( isset( $attributes['labelClass'] ) ){
|
772 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
773 |
} else {
|
774 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
775 |
}
|
776 |
}
|
777 |
|
778 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
779 |
$html .= $this->generate_element_desc( $attributes );
|
780 |
}
|
781 |
|
782 |
return $html;
|
783 |
} else {
|
784 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
785 |
}
|
786 |
}
|
787 |
|
789 |
* Get rtmedia html textarea in admin options.
|
790 |
*
|
791 |
* @access public
|
792 |
+
*
|
793 |
+
* @param array $attributes
|
794 |
+
*
|
795 |
* @return string
|
796 |
*/
|
797 |
+
public function get_textarea( $attributes = '' ){
|
798 |
|
799 |
return $this->generate_textarea( $attributes );
|
800 |
}
|
808 |
* functionality and flow needs to be decided
|
809 |
*
|
810 |
* */
|
811 |
+
// protected function generate_wysiwyg($attributes) {
|
812 |
+
//
|
813 |
+
// $element = 'rtWysiwyg';
|
814 |
+
// if( is_array($attributes) ) {
|
815 |
+
//
|
816 |
+
// $id = isset( $attributes['id'] ) ? $attributes['id'] : $this->get_default_class($element) . "-" . $this->get_default_id($element);
|
817 |
+
// $name = isset( $attributes['name'] ) ? $attributes['name'] : $element;
|
818 |
+
// if(isset($attributes['class']))
|
819 |
+
// $class = $this->embedd_class($element, $attributes['class']);
|
820 |
+
// else
|
821 |
+
// $class = $this->embedd_class($element);
|
822 |
+
// $value = isset( $attributes['value'] ) ? $attributes['value'] : "";
|
823 |
+
//
|
824 |
+
// echo '<label for="' . $id . '">';
|
825 |
+
// wp_editor( $value, $id, array('textarea_name' => $name, 'editor_class' => $class) );
|
826 |
+
// echo '</label>';
|
827 |
+
// } else
|
828 |
+
// throw new rtFormInvalidArgumentsException( "attributes" );
|
829 |
+
// }
|
830 |
+
//
|
831 |
+
// public function get_wysiwyg( $attributes = '' ) {
|
832 |
+
//
|
833 |
+
// ob_start();
|
834 |
+
// $this->generate_wysiwyg($attributes);
|
835 |
+
// return ob_get_clean();
|
836 |
+
// }
|
837 |
|
838 |
/**
|
839 |
* Generate rtmedia html input type radio in admin options.
|
840 |
*
|
841 |
* @access protected
|
842 |
+
*
|
843 |
+
* @param array $attributes
|
844 |
+
*
|
845 |
* @return string $container
|
846 |
*/
|
847 |
+
protected function generate_radio( $attributes ){
|
848 |
|
849 |
$element = 'rtRadio';
|
850 |
+
$html = '';
|
851 |
|
852 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
853 |
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
854 |
|
855 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
856 |
$html .= $this->generate_element_desc( $attributes );
|
857 |
}
|
858 |
|
859 |
$container = '<span ';
|
860 |
+
if ( isset( $attributes['class'] ) ){
|
861 |
$container .= $this->embedd_class( $element, $attributes['class'] );
|
862 |
} else {
|
863 |
$container .= $this->embedd_class( $element );
|
868 |
|
869 |
$container .= '</span>';
|
870 |
|
871 |
+
// if( isset($attributes['label']) )
|
872 |
+
// $container = $this->enclose_label('container', $container, $attributes['label']);
|
873 |
|
874 |
return $container;
|
875 |
}
|
878 |
* Get rtmedia html input type radio in admin options.
|
879 |
*
|
880 |
* @access public
|
881 |
+
*
|
882 |
+
* @param array $attributes
|
883 |
+
*
|
884 |
* @return string
|
885 |
*/
|
886 |
+
public function get_radio( $attributes = '' ){
|
887 |
|
888 |
return $this->generate_radio( $attributes );
|
889 |
}
|
892 |
* Generate rtmedia html input type checkbox in admin options.
|
893 |
*
|
894 |
* @access protected
|
895 |
+
*
|
896 |
+
* @param array $attributes
|
897 |
+
*
|
898 |
* @return string $container
|
899 |
*/
|
900 |
+
protected function generate_checkbox( $attributes ){
|
901 |
|
902 |
$element = 'rtCheckbox';
|
903 |
+
$html = '';
|
904 |
|
905 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
906 |
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
907 |
|
908 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
909 |
$html .= $this->generate_element_desc( $attributes );
|
910 |
}
|
911 |
|
912 |
$container = '<span ';
|
913 |
+
if ( isset( $attributes['class'] ) ){
|
914 |
$container .= $this->embedd_class( $element, $attributes['class'] );
|
915 |
} else {
|
916 |
$container .= $this->embedd_class( $element );
|
921 |
|
922 |
$container .= '</span>';
|
923 |
|
924 |
+
// if( isset($attributes['label']) )
|
925 |
+
// $container = $this->enclose_label('container', $container, $attributes['label']);
|
926 |
|
927 |
return $container;
|
928 |
}
|
931 |
* Get rtmedia html input type checkbox in admin options.
|
932 |
*
|
933 |
* @access public
|
934 |
+
*
|
935 |
+
* @param array $attributes
|
936 |
+
*
|
937 |
* @return string
|
938 |
*/
|
939 |
+
public function get_checkbox( $attributes = '' ){
|
940 |
|
941 |
return $this->generate_checkbox( $attributes );
|
942 |
}
|
945 |
* Get rtmedia html input type checkbox (get_switch) in admin options.
|
946 |
*
|
947 |
* @access public
|
948 |
+
*
|
949 |
+
* @param array $attributes
|
950 |
+
*
|
951 |
* @return string
|
952 |
*/
|
953 |
+
public function get_switch( $attributes = '' ){
|
954 |
|
955 |
$attributes['switch'] = true;
|
956 |
+
|
957 |
return $this->generate_checkbox( $attributes );
|
958 |
}
|
959 |
|
961 |
* Get rtmedia html input type checkbox (get_switch_square) in admin options.
|
962 |
*
|
963 |
* @access public
|
964 |
+
*
|
965 |
+
* @param array $attributes
|
966 |
+
*
|
967 |
* @return string
|
968 |
*/
|
969 |
+
public function get_switch_square( $attributes = '' ){
|
970 |
|
971 |
$attributes['switch_square'] = true;
|
972 |
+
|
973 |
return $this->generate_checkbox( $attributes );
|
974 |
}
|
975 |
|
977 |
* Generate rtmedia html input type select in admin options.
|
978 |
*
|
979 |
* @access protected
|
980 |
+
*
|
981 |
+
* @param array $attributes
|
982 |
+
*
|
983 |
* @return string $html
|
984 |
*/
|
985 |
+
protected function generate_select( $attributes ){
|
986 |
|
987 |
+
if ( is_array( $attributes ) ){
|
988 |
$element = 'rtSelect';
|
989 |
+
$html = '<select ';
|
990 |
|
991 |
+
if ( isset( $attributes['id'] ) ){
|
992 |
$id = $attributes['id'];
|
993 |
} else {
|
994 |
+
$id = $element . $this->get_default_id( $element );
|
995 |
$this->update_default_id( $element );
|
996 |
}
|
997 |
$html .= $this->generate_element_id( $element, $id ) . ' ';
|
998 |
$multiple = ( isset( $attributes['multiple'] ) && $attributes['multiple'] ) ? true : false;
|
999 |
+
$name = ( isset( $attributes['name'] ) ) ? $attributes['name'] : $element;
|
1000 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
1001 |
+
if ( isset( $attributes['class'] ) ){
|
1002 |
$html .= $this->embedd_class( $element, $attributes['class'] );
|
1003 |
} else {
|
1004 |
$html .= $this->embedd_class( $element );
|
1005 |
}
|
1006 |
|
1007 |
+
if ( isset( $attributes['misc'] ) ){
|
1008 |
+
$html .= ' ' . $this->embedd_misc_attributes( $attributes['misc'] );
|
1009 |
}
|
1010 |
|
1011 |
$html .= '>';
|
1015 |
|
1016 |
$html .= '</select>';
|
1017 |
|
1018 |
+
if ( isset( $attributes['label'] ) ){
|
1019 |
+
if ( isset( $attributes['labelClass'] ) ){
|
1020 |
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
1021 |
} else {
|
1022 |
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
1023 |
}
|
1024 |
}
|
1025 |
|
1026 |
+
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
1027 |
$html .= $this->generate_element_desc( $attributes );
|
1028 |
}
|
1029 |
|
1030 |
return $html;
|
1031 |
} else {
|
1032 |
+
throw new rtFormInvalidArgumentsException( 'attributes' );
|
1033 |
}
|
1034 |
|
1035 |
}
|
1038 |
* Get rtmedia html input type select in admin options.
|
1039 |
*
|
1040 |
* @access public
|
1041 |
+
*
|
1042 |
+
* @param array $attributes
|
1043 |
+
*
|
1044 |
* @return string
|
1045 |
*/
|
1046 |
+
public function get_select( $attributes = '' ){
|
1047 |
|
1048 |
return $this->generate_select( $attributes );
|
1049 |
}
|
app/helper/rtFormInvalidArgumentsException.php
CHANGED
@@ -15,12 +15,12 @@ if ( ! class_exists( "rtFormsInvalidArgumentsException" ) ){
|
|
15 |
|
16 |
class rtFormInvalidArgumentsException extends Exception {
|
17 |
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
}
|
26 |
}
|
15 |
|
16 |
class rtFormInvalidArgumentsException extends Exception {
|
17 |
|
18 |
+
public function __construct( $msg ){
|
19 |
|
20 |
+
//Error Message
|
21 |
+
$errorMsg = sprintf( __( 'Error on line %s in %s : <b>The method expects an array in arguments for %s provided.</b>', 'rtmedia' ), $this->getLine(), $this->getFile(), $msg );
|
22 |
|
23 |
+
echo $errorMsg;
|
24 |
+
}
|
25 |
}
|
26 |
}
|
app/helper/rtPluginUpdateChecker.php
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
7 |
?>
|
1 |
<?php
|
2 |
+
|
3 |
+
class rtPluginUpdateChecker {
|
4 |
+
function __construct( $url, $path, $slug, $priority ){
|
5 |
+
//code removed
|
6 |
+
}
|
7 |
+
}
|
8 |
+
|
9 |
?>
|
app/helper/rtProgress.php
CHANGED
@@ -37,10 +37,10 @@ class rtProgress {
|
|
37 |
</div>
|
38 |
';
|
39 |
|
40 |
-
|
41 |
-
|
42 |
} else {
|
43 |
-
|
44 |
}
|
45 |
}
|
46 |
|
@@ -53,11 +53,11 @@ class rtProgress {
|
|
53 |
* @return float
|
54 |
*/
|
55 |
public function progress( $progress, $total ) {
|
56 |
-
|
57 |
-
|
58 |
}
|
59 |
|
60 |
-
return ( $progress
|
61 |
}
|
62 |
|
63 |
}
|
37 |
</div>
|
38 |
';
|
39 |
|
40 |
+
if ( $echo ){
|
41 |
+
echo $progress_ui;
|
42 |
} else {
|
43 |
+
return $progress_ui;
|
44 |
}
|
45 |
}
|
46 |
|
53 |
* @return float
|
54 |
*/
|
55 |
public function progress( $progress, $total ) {
|
56 |
+
if ( $total < 1 ){
|
57 |
+
return 100;
|
58 |
}
|
59 |
|
60 |
+
return ( $progress / $total ) * 100;
|
61 |
}
|
62 |
|
63 |
}
|
app/importers/BPMediaAlbumimporter.php
CHANGED
@@ -12,221 +12,219 @@
|
|
12 |
*/
|
13 |
class BPMediaAlbumimporter extends BPMediaImporter {
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
30 |
ADD COLUMN import_status BIGINT (20) NOT NULL DEFAULT 0,
|
31 |
ADD COLUMN old_activity_id BIGINT (20) NOT NULL DEFAULT 0,
|
32 |
ADD COLUMN new_activity_id BIGINT (20) NOT NULL DEFAULT 0,
|
33 |
-
ADD COLUMN favorites TINYINT (1) NOT NULL DEFAULT 0"
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
$
|
51 |
-
|
52 |
-
// print_r($
|
53 |
-
|
54 |
-
// print_r($
|
55 |
-
|
56 |
-
//
|
57 |
-
|
58 |
-
//
|
59 |
-
|
60 |
-
// print_r($
|
61 |
-
|
62 |
-
// print_r($
|
63 |
-
|
64 |
-
// print_r($
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
echo '<br />';
|
168 |
-
echo '<br />';
|
169 |
-
echo '<strong>' . __('Why don\'t you try adding some instagram like effects to your images?', 'rtmedia') . '</strong>';
|
170 |
-
echo '<div class="bp-media-addon">
|
171 |
<a href="http://rtcamp.com/store/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">
|
172 |
-
<img width="240" height="184" title="BuddyPress-Media Instagram" alt="BuddyPress-Media Instagram" src="'
|
173 |
</a>
|
174 |
<h4><a href="http://rtcamp.com/store/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">BuddyPress-Media Instagram</a></h4>
|
175 |
<div class="product_desc">
|
176 |
-
<p>'.__('BuddyPress Media Instagram adds Instagram like filters to images uploaded with BuddyPress Media.', 'rtmedia').'</p>
|
177 |
-
<p><strong>'.__('Important','rtmedia').':</strong> '.__('You need to have ImageMagick installed on your server for this addon to work.','rtmedia').'</p>
|
178 |
</div>
|
179 |
<div class="product_footer">
|
180 |
<span class="price alignleft"><span class="amount">$19</span></span>
|
181 |
-
<a class="add_to_cart_button alignright product_type_simple" href="http://rtcamp.com/store/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer&add-to-cart=34379" target="_blank">'.__('Buy Now','rtmedia').'</a>
|
182 |
-
<a class="alignleft product_demo_link" href="http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">'.__('Live Demo','rtmedia').'</a>
|
183 |
</div></div>';
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
|
|
230 |
FROM (
|
231 |
SELECT (
|
232 |
SELECT COUNT( a.id )
|
@@ -240,30 +238,32 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
240 |
WHERE activity.component = 'album'
|
241 |
AND activity.type = 'bp_album_picture'
|
242 |
AND album.import_status =0
|
243 |
-
)b");
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
254 |
FROM $activity_table AS activity
|
255 |
INNER JOIN $bp_album_table AS album ON ( activity.item_id = album.import_status )
|
256 |
WHERE activity.component = 'activity'
|
257 |
-
AND activity.type = 'activity_comment'");
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
|
|
267 |
FROM $table
|
268 |
WHERE owner_id NOT
|
269 |
IN (
|
@@ -271,154 +271,158 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
271 |
FROM $table a
|
272 |
WHERE a.import_status =0
|
273 |
)
|
274 |
-
");
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
|
|
|
|
|
|
|
|
423 |
|
424 |
}
|
12 |
*/
|
13 |
class BPMediaAlbumimporter extends BPMediaImporter {
|
14 |
|
15 |
+
function __construct(){
|
16 |
+
global $wpdb;
|
17 |
+
parent::__construct();
|
18 |
+
$table = "{$wpdb->base_prefix}bp_album";
|
19 |
+
if ( BPMediaImporter::table_exists( $table ) && BPMediaAlbumimporter::_active( 'bp-album/loader.php' ) != - 1 && ! $this->column_exists( 'import_status' ) ){
|
20 |
+
$this->update_table();
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
function update_table(){
|
25 |
+
if ( $this->column_exists( 'import_status' ) ){
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
global $wpdb;
|
29 |
+
|
30 |
+
return $wpdb->query( "ALTER TABLE {$wpdb->base_prefix}bp_album
|
31 |
ADD COLUMN import_status BIGINT (20) NOT NULL DEFAULT 0,
|
32 |
ADD COLUMN old_activity_id BIGINT (20) NOT NULL DEFAULT 0,
|
33 |
ADD COLUMN new_activity_id BIGINT (20) NOT NULL DEFAULT 0,
|
34 |
+
ADD COLUMN favorites TINYINT (1) NOT NULL DEFAULT 0" );
|
35 |
+
}
|
36 |
+
|
37 |
+
function column_exists( $column ){
|
38 |
+
global $wpdb;
|
39 |
+
|
40 |
+
return $wpdb->query( "SHOW COLUMNS FROM {$wpdb->base_prefix}bp_album LIKE '$column'" );
|
41 |
+
}
|
42 |
+
|
43 |
+
function ui(){
|
44 |
+
global $wpdb;
|
45 |
+
$bp_album_active = BPMediaImporter::_active( 'bp-album/loader.php' );
|
46 |
+
$table = "{$wpdb->base_prefix}bp_album";
|
47 |
+
if ( BPMediaImporter::table_exists( $table ) ){
|
48 |
+
|
49 |
+
$this->progress = new rtProgress();
|
50 |
+
$total = BPMediaAlbumimporter::get_total_count();
|
51 |
+
// print_r($total);
|
52 |
+
$remaining_comments = $this->get_remaining_comments();
|
53 |
+
// print_r($remaining_comments);
|
54 |
+
$finished = BPMediaAlbumimporter::get_completed_media( $total );
|
55 |
+
// print_r($finished);
|
56 |
+
$finished_users = BPMediaAlbumimporter::get_completed_users();
|
57 |
+
// print_R($finished_users);
|
58 |
+
$finished_comments = $this->get_finished_comments();
|
59 |
+
// print_r($finished_comments);
|
60 |
+
$total_comments = (int) $finished_comments + (int) $remaining_comments;
|
61 |
+
// print_r($total_comments);
|
62 |
+
$completed_users_favorites = (int) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 );
|
63 |
+
// print_r($completed_users_favorites);
|
64 |
+
$users = count_users();
|
65 |
+
// print_r($users);
|
66 |
+
|
67 |
+
echo '<div id="bpmedia-bpalbumimporter">';
|
68 |
+
if ( ( $finished[0]->media != $total[0]->media ) || ( $users['total_users'] > $completed_users_favorites ) ){
|
69 |
+
if ( 1 != $bp_album_active ){
|
70 |
+
echo '<div id="setting-error-bp-album-importer" class="error settings-error below-h2">
|
71 |
+
<p><strong>' . __( 'Warning!', 'rtmedia' ) . '</strong> ' . sprintf( __( 'This import process is irreversible. Although everything is tested, please take a <a target="_blank" href="http://codex.wordpress.org/WordPress_Backups">backup of your database and files</a>, before proceeding. If you don\'t know your way around databases and files, consider <a target="_blank" href="%s">hiring us</a>, or another professional.', 'rtmedia' ), 'http://rtcamp.com/contact/?purpose=buddypress&utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media' ) . '</p>';
|
72 |
+
echo '<p>' . __( 'If you have set "WP_DEBUG" in you wp-config.php file, please make sure it is set to "false", so that it doesn\'t conflict with the import process.', 'rtmedia' ) . '</p></div>';
|
73 |
+
echo '<div class="bp-album-import-accept"><p><strong><label for="bp-album-import-accept"><input type="checkbox" value="accept" name="bp-album-import-accept" id="bp-album-import-accept" /> ' . __( 'I have taken a backup of the database and files of this site.', 'rtmedia' ) . '</label></strong></p></div>';
|
74 |
+
echo '<button id="bpmedia-bpalbumimport" class="button button-primary">';
|
75 |
+
_e( 'Start Import', 'rtmedia' );
|
76 |
+
echo '</button>';
|
77 |
+
echo '<div class="bp-album-importer-wizard">';
|
78 |
+
echo '<div class="bp-album-users">';
|
79 |
+
echo '<strong>';
|
80 |
+
echo __( 'Users', 'rtmedia' ) . ': <span class="finished">' . $finished_users[0]->users . '</span> / <span class="total">' . $total[0]->users . '</span>';
|
81 |
+
echo '</strong>';
|
82 |
+
if ( 0 != $total[0]->users ){
|
83 |
+
$users_progress = $this->progress->progress( $finished_users[0]->users, $total[0]->users );
|
84 |
+
$this->progress->progress_ui( $users_progress );
|
85 |
+
}
|
86 |
+
echo '</div>';
|
87 |
+
echo '<br />';
|
88 |
+
echo '<div class="bp-album-media">';
|
89 |
+
echo '<strong>';
|
90 |
+
echo __( 'Media', 'rtmedia' ) . ': <span class="finished">' . $finished[0]->media . '</span> / <span class="total">' . $total[0]->media . '</span>';
|
91 |
+
echo '</strong>';
|
92 |
+
$progress = 100;
|
93 |
+
if ( 0 != $total[0]->media ){
|
94 |
+
$todo = $total[0]->media - $finished[0]->media;
|
95 |
+
$steps = ceil( $todo / 5 );
|
96 |
+
$laststep = $todo % 5;
|
97 |
+
$progress = $this->progress->progress( $finished[0]->media, $total[0]->media );
|
98 |
+
echo '<input type="hidden" value="' . $finished[0]->media . '" name="finished"/>';
|
99 |
+
echo '<input type="hidden" value="' . $total[0]->media . '" name="total"/>';
|
100 |
+
echo '<input type="hidden" value="' . $todo . '" name="todo"/>';
|
101 |
+
echo '<input type="hidden" value="' . $steps . '" name="steps"/>';
|
102 |
+
echo '<input type="hidden" value="' . $laststep . '" name="laststep"/>';
|
103 |
+
$this->progress->progress_ui( $progress );
|
104 |
+
}
|
105 |
+
echo '</div>';
|
106 |
+
echo '<br>';
|
107 |
+
echo '<div class="bp-album-comments">';
|
108 |
+
if ( 0 != $total_comments ){
|
109 |
+
echo '<strong>';
|
110 |
+
echo __( 'Comments', 'rtmedia' ) . ': <span class="finished">' . $finished_comments . '</span> / <span class="total">' . $total_comments . '</span>';
|
111 |
+
echo '</strong>';
|
112 |
+
$comments_progress = $this->progress->progress( $finished_comments, $total_comments );
|
113 |
+
$this->progress->progress_ui( $comments_progress );
|
114 |
+
echo '<br />';
|
115 |
+
} else {
|
116 |
+
echo '<p><strong>' . __( 'Comments: 0/0 (No comments to import)', 'rtmedia' ) . '</strong></p>';
|
117 |
+
}
|
118 |
+
echo '</div>';
|
119 |
+
if ( 0 != $completed_users_favorites ){
|
120 |
+
echo '<br />';
|
121 |
+
echo '<div class="bp-album-favorites">';
|
122 |
+
echo '<strong>';
|
123 |
+
echo __( 'User\'s Favorites', 'rtmedia' ) . ': <span class="finished">' . $completed_users_favorites . '</span> / <span class="total">' . $users['total_users'] . '</span>';
|
124 |
+
echo '</strong>';
|
125 |
+
$favorites_progress = $this->progress->progress( $completed_users_favorites, $users['total_users'] );
|
126 |
+
$this->progress->progress_ui( $favorites_progress );
|
127 |
+
echo '</div>';
|
128 |
+
}
|
129 |
+
echo '</div>';
|
130 |
+
} else {
|
131 |
+
$deactivate_link = wp_nonce_url( admin_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $this->path ) ), 'deactivate-plugin_' . $this->path );
|
132 |
+
echo '<p>' . __( 'BP-Album is active on your site and will cause problems with the import.', 'rtmedia' ) . '</p>';
|
133 |
+
echo '<p><a class="button button-primary deactivate-bp-album" href="' . $deactivate_link . '">' . __( 'Click here to deactivate BP-Album and continue importing', 'rtmedia' ) . '</a></p>';
|
134 |
+
}
|
135 |
+
} else {
|
136 |
+
$corrupt_media = BPMediaAlbumimporter::get_corrupt_media();
|
137 |
+
if ( $corrupt_media ){
|
138 |
+
echo '<div class="error below-h2">';
|
139 |
+
echo '<p><strong>' . __( 'Some of the media failed to import. The file might be corrupt or deleted.', 'rtmedia' ) . '</strong></p>';
|
140 |
+
echo '<p>' . sprintf( __( 'The following %d BP Album Media id\'s could not be imported', 'rtmedia' ), count( $corrupt_media ) ) . ': </p>';
|
141 |
+
$corrupt_prefix_path = str_replace( '/wp-content', '', WP_CONTENT_URL );
|
142 |
+
foreach ( $corrupt_media as $corrupt ) {
|
143 |
+
echo '<p>' . $corrupt->id . ' => <a href="' . $corrupt_prefix_path . $corrupt->pic_org_url . '">' . $corrupt->title . '</a></p>';
|
144 |
+
}
|
145 |
+
echo '</div>';
|
146 |
+
} else {
|
147 |
+
echo '<div class="bp-album-import-accept i-accept">';
|
148 |
+
echo '<p class="info">';
|
149 |
+
$message = sprintf( __( 'I just imported bp-album to @buddypressmedia http://rt.cx/rtmedia on %s', 'rtmedia' ), home_url() );
|
150 |
+
echo '<strong>' . __( 'Congratulations!', 'rtmedia' ) . '</strong> ' . __( 'All media from BP Album has been imported.', 'rtmedia' );
|
151 |
+
echo ' <a href="http://twitter.com/home/?status=' . $message . '" class="button button-import-tweet" target= "_blank">' . __( 'Tweet this', 'rtmedia' ) . '</a>';
|
152 |
+
echo '</p>';
|
153 |
+
echo '</div>';
|
154 |
+
}
|
155 |
+
echo '<p>' . __( 'However, a lot of unnecessary files and a database table are still eating up your resources. If everything seems fine, you can clean this data up.', 'rtmedia' ) . '</p>';
|
156 |
+
echo '<br />';
|
157 |
+
echo '<button id="bpmedia-bpalbumimport-cleanup" class="button btn-warning">';
|
158 |
+
_e( 'Clean up Now', 'rtmedia' );
|
159 |
+
echo '</button>';
|
160 |
+
echo ' <a href="' . add_query_arg( array( 'page' => 'bp-media-settings' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) . '" id="bpmedia-bpalbumimport-cleanup-later" class="button">';
|
161 |
+
_e( 'Clean up Later', 'rtmedia' );
|
162 |
+
echo '</a>';
|
163 |
+
echo '<br />';
|
164 |
+
echo '<br />';
|
165 |
+
echo '<br />';
|
166 |
+
echo '<strong>' . __( 'Why don\'t you try adding some instagram like effects to your images?', 'rtmedia' ) . '</strong>';
|
167 |
+
echo '<div class="bp-media-addon">
|
|
|
|
|
|
|
|
|
168 |
<a href="http://rtcamp.com/store/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">
|
169 |
+
<img width="240" height="184" title="BuddyPress-Media Instagram" alt="BuddyPress-Media Instagram" src="' . $img_src . 'BuddyPressMedia-Instagram.png?ref=bp-album-importer">
|
170 |
</a>
|
171 |
<h4><a href="http://rtcamp.com/store/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">BuddyPress-Media Instagram</a></h4>
|
172 |
<div class="product_desc">
|
173 |
+
<p>' . __( 'BuddyPress Media Instagram adds Instagram like filters to images uploaded with BuddyPress Media.', 'rtmedia' ) . '</p>
|
174 |
+
<p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>
|
175 |
</div>
|
176 |
<div class="product_footer">
|
177 |
<span class="price alignleft"><span class="amount">$19</span></span>
|
178 |
+
<a class="add_to_cart_button alignright product_type_simple" href="http://rtcamp.com/store/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer&add-to-cart=34379" target="_blank">' . __( 'Buy Now', 'rtmedia' ) . '</a>
|
179 |
+
<a class="alignleft product_demo_link" href="http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>
|
180 |
</div></div>';
|
181 |
+
}
|
182 |
+
echo '</div>';
|
183 |
+
} else {
|
184 |
+
echo '<p>' . __( 'Looks like you don\'t use BP Album. Is there any other BuddyPress Plugin you want an importer for?' ) . '</p>';
|
185 |
+
echo '<p>' . sprintf( __( '<a href="%s">Create an issue</a> on GitHub requesting the same.', 'rtmedia' ), 'https://github.com/rtCamp/buddypress-media/issues/new' ) . '</p>';
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
function create_album( $author_id, $album_name = 'Imported Media' ){
|
190 |
+
global $bp_media, $wpdb;
|
191 |
+
|
192 |
+
if ( array_key_exists( 'bp_album_import_name', $bp_media->options ) ){
|
193 |
+
if ( '' != $bp_media->options['bp_album_import_name'] ){
|
194 |
+
$album_name = $bp_media->options['bp_album_import_name'];
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
$query = "SELECT ID from $wpdb->posts WHERE post_type='bp_media_album' AND post_status = 'publish' AND post_author = $author_id AND post_title LIKE '{$album_name}'";
|
199 |
+
$result = $wpdb->get_results( $query );
|
200 |
+
if ( count( $result ) < 1 ){
|
201 |
+
$album = new BPMediaAlbum();
|
202 |
+
$album->add_album( $album_name, $author_id );
|
203 |
+
$album_id = $album->get_id();
|
204 |
+
} else {
|
205 |
+
$album_id = $result[0]->ID;
|
206 |
+
}
|
207 |
+
$wpdb->update( $wpdb->base_prefix . 'bp_activity', array( 'secondary_item_id' => - 999 ), array( 'id' => get_post_meta( $album_id, 'bp_media_child_activity', true ) ) );
|
208 |
+
|
209 |
+
return $album_id;
|
210 |
+
}
|
211 |
+
|
212 |
+
static function get_total_count(){
|
213 |
+
global $wpdb;
|
214 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
215 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
216 |
+
return $wpdb->get_results( "SELECT COUNT(DISTINCT owner_id) as users, COUNT(id) as media FROM $table" );
|
217 |
+
}
|
218 |
+
|
219 |
+
return 0;
|
220 |
+
}
|
221 |
+
|
222 |
+
function get_remaining_comments(){
|
223 |
+
global $wpdb;
|
224 |
+
$bp_album_table = $wpdb->base_prefix . 'bp_album';
|
225 |
+
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
226 |
+
if ( $this->table_exists( $bp_album_table ) ){
|
227 |
+
return $wpdb->get_var( "SELECT SUM( b.count ) AS total
|
228 |
FROM (
|
229 |
SELECT (
|
230 |
SELECT COUNT( a.id )
|
238 |
WHERE activity.component = 'album'
|
239 |
AND activity.type = 'bp_album_picture'
|
240 |
AND album.import_status =0
|
241 |
+
)b" );
|
242 |
+
}
|
243 |
+
|
244 |
+
return 0;
|
245 |
+
}
|
246 |
+
|
247 |
+
function get_finished_comments(){
|
248 |
+
global $wpdb;
|
249 |
+
$bp_album_table = $wpdb->base_prefix . 'bp_album';
|
250 |
+
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
251 |
+
if ( $this->table_exists( $bp_album_table ) ){
|
252 |
+
return $wpdb->get_var( "SELECT COUNT( activity.id ) AS count
|
253 |
FROM $activity_table AS activity
|
254 |
INNER JOIN $bp_album_table AS album ON ( activity.item_id = album.import_status )
|
255 |
WHERE activity.component = 'activity'
|
256 |
+
AND activity.type = 'activity_comment'" );
|
257 |
+
}
|
258 |
+
|
259 |
+
return 0;
|
260 |
+
}
|
261 |
+
|
262 |
+
static function get_completed_users(){
|
263 |
+
global $wpdb;
|
264 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
265 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
266 |
+
return $wpdb->get_results( "SELECT COUNT( DISTINCT owner_id ) AS users
|
267 |
FROM $table
|
268 |
WHERE owner_id NOT
|
269 |
IN (
|
271 |
FROM $table a
|
272 |
WHERE a.import_status =0
|
273 |
)
|
274 |
+
" );
|
275 |
+
}
|
276 |
+
|
277 |
+
return 0;
|
278 |
+
}
|
279 |
+
|
280 |
+
static function get_completed_media(){
|
281 |
+
global $wpdb;
|
282 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
283 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
284 |
+
return $wpdb->get_results( "SELECT COUNT(id) as media FROM $table WHERE import_status!=0" );
|
285 |
+
}
|
286 |
+
|
287 |
+
return 0;
|
288 |
+
}
|
289 |
+
|
290 |
+
static function get_corrupt_media(){
|
291 |
+
global $wpdb;
|
292 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
293 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
294 |
+
return $wpdb->get_results( "SELECT id,title,pic_org_url FROM $table WHERE import_status=-1" );
|
295 |
+
}
|
296 |
+
|
297 |
+
return 0;
|
298 |
+
}
|
299 |
+
|
300 |
+
static function batch_import( $count = 5 ){
|
301 |
+
global $wpdb;
|
302 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
303 |
+
$bp_album_data = $wpdb->get_results( "SELECT * FROM $table WHERE import_status = 0 ORDER BY owner_id LIMIT $count" );
|
304 |
+
|
305 |
+
return $bp_album_data;
|
306 |
+
}
|
307 |
+
|
308 |
+
static function bpmedia_ajax_import_callback(){
|
309 |
+
|
310 |
+
$page = isset( $_GET['page'] ) ? $_GET['page'] : 1;
|
311 |
+
$count = isset( $_GET['count'] ) ? $_GET['count'] : 5;
|
312 |
+
$bp_album_data = BPMediaAlbumimporter::batch_import( $count );
|
313 |
+
global $wpdb;
|
314 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
315 |
+
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
316 |
+
$activity_meta_table = $wpdb->base_prefix . 'bp_activity_meta';
|
317 |
+
$comments = 0;
|
318 |
+
foreach ( $bp_album_data as &$bp_album_item ) {
|
319 |
+
|
320 |
+
if ( get_site_option( 'bp_media_bp_album_importer_base_path' ) == '' ){
|
321 |
+
$base_path = pathinfo( $bp_album_item->pic_org_path );
|
322 |
+
update_site_option( 'bp_media_bp_album_importer_base_path', $base_path['dirname'] );
|
323 |
+
}
|
324 |
+
$bpm_host_wp = new BPMediaHostWordpress();
|
325 |
+
$bpm_host_wp->check_and_create_album( 0, 0, $bp_album_item->owner_id );
|
326 |
+
$album_id = BPMediaAlbumimporter::create_album( $bp_album_item->owner_id, 'Imported Media' );
|
327 |
+
$imported_media_id = BPMediaImporter::add_media( $album_id, $bp_album_item->title, $bp_album_item->description, $bp_album_item->pic_org_path, $bp_album_item->privacy, $bp_album_item->owner_id, 'Imported Media' );
|
328 |
+
$wpdb->update( $table, array( 'import_status' => ( $imported_media_id ) ? $imported_media_id : - 1 ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
329 |
+
if ( $imported_media_id ){
|
330 |
+
$comments += (int) BPMediaAlbumimporter::update_recorded_time_and_comments( $imported_media_id, $bp_album_item->id, "{$wpdb->base_prefix}bp_album" );
|
331 |
+
$bp_album_media_id = $wpdb->get_var( "SELECT activity.id from $activity_table as activity INNER JOIN $table as album ON ( activity.item_id = album.id ) WHERE activity.item_id = $bp_album_item->id AND activity.component = 'album' AND activity.type='bp_album_picture'" );
|
332 |
+
$wpdb->update( $table, array( 'old_activity_id' => $bp_album_media_id ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
333 |
+
$bp_new_activity_id = $wpdb->get_var( "SELECT id from $activity_table WHERE item_id = $imported_media_id AND component = 'activity' AND type='activity_update' AND secondary_item_id=0" );
|
334 |
+
$wpdb->update( $table, array( 'new_activity_id' => $bp_new_activity_id ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
335 |
+
if ( $wpdb->update( $activity_meta_table, array( 'activity_id' => $bp_new_activity_id ), array( 'activity_id' => $bp_album_media_id, 'meta_key' => 'favorite_count' ), array( '%d' ), array( '%d' ) ) ){
|
336 |
+
$wpdb->update( $table, array( 'favorites' => 1 ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
337 |
+
}
|
338 |
+
}
|
339 |
+
}
|
340 |
+
|
341 |
+
$finished_users = BPMediaAlbumimporter::get_completed_users();
|
342 |
+
|
343 |
+
echo json_encode( array( 'page' => $page, 'users' => $finished_users[0]->users, 'comments' => $comments ) );
|
344 |
+
die();
|
345 |
+
}
|
346 |
+
|
347 |
+
static function bpmedia_ajax_import_favorites(){
|
348 |
+
global $wpdb;
|
349 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
350 |
+
$users = count_users();
|
351 |
+
echo json_encode( array( 'favorites' => $wpdb->get_var( "SELECT COUNT(id) from $table WHERE favorites != 0" ), 'users' => $users['total_users'], 'offset' => (int) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 ) ) );
|
352 |
+
die();
|
353 |
+
}
|
354 |
+
|
355 |
+
static function bpmedia_ajax_import_step_favorites(){
|
356 |
+
$offset = isset( $_POST['offset'] ) ? $_POST['offset'] : 0;
|
357 |
+
$redirect = isset( $_POST['redirect'] ) ? $_POST['redirect'] : false;
|
358 |
+
global $wpdb;
|
359 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
360 |
+
$blogusers = get_users( array( 'meta_key' => 'bp_favorite_activities', 'offset' => $offset, 'number' => 1 ) );
|
361 |
+
if ( $blogusers ){
|
362 |
+
foreach ( $blogusers as $user ) {
|
363 |
+
$favorite_activities = get_user_meta( $user->ID, 'bp_favorite_activities', true );
|
364 |
+
if ( $favorite_activities ){
|
365 |
+
$new_favorite_activities = $favorite_activities;
|
366 |
+
foreach ( $favorite_activities as $key => $favorite ) {
|
367 |
+
if ( $new_act = $wpdb->get_var( "SELECT new_activity_id from $table WHERE old_activity_id = $favorite" ) ){
|
368 |
+
$new_favorite_activities[ $key ] = $new_act;
|
369 |
+
}
|
370 |
+
}
|
371 |
+
update_user_meta( $user->ID, 'bp_favorite_activities', $new_favorite_activities );
|
372 |
+
}
|
373 |
+
$completed_users_favorites = (int) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 ) + 1;
|
374 |
+
update_site_option( 'bp_media_bp_album_favorite_import_status', $completed_users_favorites );
|
375 |
+
}
|
376 |
+
}
|
377 |
+
echo $redirect;
|
378 |
+
die();
|
379 |
+
}
|
380 |
+
|
381 |
+
static function cleanup_after_install(){
|
382 |
+
global $wpdb;
|
383 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
384 |
+
$dir = get_site_option( 'bp_media_bp_album_importer_base_path' );
|
385 |
+
BPMediaImporter::cleanup( $table, $dir );
|
386 |
+
die();
|
387 |
+
}
|
388 |
+
|
389 |
+
static function update_recorded_time_and_comments( $media, $bp_album_id, $table ){
|
390 |
+
global $wpdb;
|
391 |
+
if ( function_exists( 'bp_activity_add' ) ){
|
392 |
+
if ( ! is_object( $media ) ){
|
393 |
+
try {
|
394 |
+
$media = new BPMediaHostWordpress( $media );
|
395 |
+
} catch ( exception $e ) {
|
396 |
+
return false;
|
397 |
+
}
|
398 |
+
}
|
399 |
+
$activity_id = get_post_meta( $media->get_id(), 'bp_media_child_activity', true );
|
400 |
+
if ( $activity_id ){
|
401 |
+
$date_uploaded = $wpdb->get_var( "SELECT date_uploaded from $table WHERE id = $bp_album_id" );
|
402 |
+
$old_activity_id = $wpdb->get_var( "SELECT id from {$wpdb->base_prefix}bp_activity WHERE component = 'album' AND type = 'bp_album_picture' AND item_id = $bp_album_id" );
|
403 |
+
if ( $old_activity_id ){
|
404 |
+
$comments = $wpdb->get_results( "SELECT id,secondary_item_id from {$wpdb->base_prefix}bp_activity WHERE component = 'activity' AND type = 'activity_comment' AND item_id = $old_activity_id" );
|
405 |
+
foreach ( $comments as $comment ) {
|
406 |
+
$update = array( 'item_id' => $activity_id );
|
407 |
+
if ( $comment->secondary_item_id == $old_activity_id ){
|
408 |
+
$update['secondary_item_id'] = $activity_id;
|
409 |
+
}
|
410 |
+
$wpdb->update( $wpdb->base_prefix . 'bp_activity', $update, array( 'id' => $comment->id ) );
|
411 |
+
BP_Activity_Activity::rebuild_activity_comment_tree( $activity_id );
|
412 |
+
}
|
413 |
+
}
|
414 |
+
$wpdb->update( $wpdb->base_prefix . 'bp_activity', array( 'date_recorded' => $date_uploaded ), array( 'id' => $activity_id ) );
|
415 |
+
|
416 |
+
return count( $comments );
|
417 |
+
}
|
418 |
+
|
419 |
+
return 0;
|
420 |
+
}
|
421 |
+
}
|
422 |
+
|
423 |
+
static function bp_album_deactivate(){
|
424 |
+
deactivate_plugins( 'bp-album/loader.php' );
|
425 |
+
die( true );
|
426 |
+
}
|
427 |
|
428 |
}
|
app/importers/BPMediaImporter.php
CHANGED
@@ -12,143 +12,146 @@
|
|
12 |
*/
|
13 |
class BPMediaImporter {
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
$
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
128 |
DELETE FROM {$wpdb->base_prefix}bp_activity
|
129 |
WHERE component = %s
|
130 |
-
", 'album'
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
|
154 |
}
|
12 |
*/
|
13 |
class BPMediaImporter {
|
14 |
|
15 |
+
/**
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
var $active;
|
19 |
+
var $import_steps;
|
20 |
+
|
21 |
+
function __construct(){
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
static function table_exists( $table ){
|
26 |
+
global $wpdb;
|
27 |
+
|
28 |
+
if ( 1 == $wpdb->query( "SHOW TABLES LIKE '" . $table . "'" ) ){
|
29 |
+
return true;
|
30 |
+
}
|
31 |
+
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
static function _active( $path ){
|
36 |
+
if ( ! function_exists( 'is_plugin_inactive' ) ){
|
37 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
38 |
+
}
|
39 |
+
if ( is_plugin_active( $path ) ){
|
40 |
+
return 1;
|
41 |
+
}
|
42 |
+
$plugins = get_plugins();
|
43 |
+
if ( array_key_exists( $path, $plugins ) ){
|
44 |
+
return 0;
|
45 |
+
} else {
|
46 |
+
return - 1;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
static function file_array( $filepath ){
|
51 |
+
|
52 |
+
$path_info = pathinfo( $filepath );
|
53 |
+
$filetype = wp_check_filetype( $filepath );
|
54 |
+
$file['error'] = '';
|
55 |
+
$file['name'] = $path_info['basename'];
|
56 |
+
$file['type'] = $filetype['type'];
|
57 |
+
$file['tmp_name'] = $filepath;
|
58 |
+
$file['size'] = filesize( $filepath );
|
59 |
+
|
60 |
+
return $file;
|
61 |
+
}
|
62 |
+
|
63 |
+
static function make_copy( $filepath ){
|
64 |
+
$upload_dir = wp_upload_dir();
|
65 |
+
$path_info = pathinfo( $filepath );
|
66 |
+
$tmp_dir = trailingslashit( $upload_dir['basedir'] ) . 'bp-album-importer';
|
67 |
+
$newpath = trailingslashit( $tmp_dir ) . $path_info['basename'];
|
68 |
+
if ( ! is_dir( $tmp_dir ) ){
|
69 |
+
wp_mkdir_p( $tmp_dir );
|
70 |
+
}
|
71 |
+
if ( file_exists( $filepath ) ){
|
72 |
+
if ( copy( $filepath, $newpath ) ){
|
73 |
+
return BPMediaImporter::file_array( $newpath );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
return 0;
|
78 |
+
}
|
79 |
+
|
80 |
+
function create_album( $album_name = '', $author_id = 1 ){
|
81 |
+
|
82 |
+
global $bp_media;
|
83 |
+
|
84 |
+
if ( array_key_exists( 'bp_album_import_name', $bp_media->options ) ){
|
85 |
+
if ( '' != $bp_media->options['bp_album_import_name'] ){
|
86 |
+
$album_name = $bp_media->options['bp_album_import_name'];
|
87 |
+
}
|
88 |
+
}
|
89 |
+
$found_album = BuddyPressMedia::get_wall_album();
|
90 |
+
|
91 |
+
if ( count( $found_album ) < 1 ){
|
92 |
+
$album = new BPMediaAlbum();
|
93 |
+
$album->add_album( $album_name, $author_id );
|
94 |
+
$album_id = $album->get_id();
|
95 |
+
} else {
|
96 |
+
$album_id = $found_album[0]->ID;
|
97 |
+
}
|
98 |
+
|
99 |
+
return $album_id;
|
100 |
+
}
|
101 |
+
|
102 |
+
static function add_media( $album_id, $title = '', $description = '', $filepath = '', $privacy = 0, $author_id = false, $album_name = false ){
|
103 |
+
|
104 |
+
$files = BPMediaImporter::make_copy( $filepath );
|
105 |
+
if ( $files ){
|
106 |
+
global $wpdb;
|
107 |
+
$bp_imported_media = new BPMediaHostWordpress();
|
108 |
+
// add_filter('bp_media_force_hide_activity', create_function('', 'return true;'));
|
109 |
+
$imported_media_id = $bp_imported_media->insertmedia( $title, $description, $album_id, 0, false, false, $files, $author_id, $album_name );
|
110 |
+
|
111 |
+
wp_update_post( $args = array( 'ID' => $imported_media_id, 'post_author' => $author_id ) );
|
112 |
+
|
113 |
+
$bp_album_privacy = $privacy;
|
114 |
+
if ( $bp_album_privacy == 10 ){
|
115 |
+
$bp_album_privacy = 6;
|
116 |
+
}
|
117 |
+
|
118 |
+
$privacy = new BPMediaPrivacy();
|
119 |
+
$privacy->save( $bp_album_privacy, $imported_media_id );
|
120 |
+
|
121 |
+
return $imported_media_id;
|
122 |
+
}
|
123 |
+
|
124 |
+
return 0;
|
125 |
+
}
|
126 |
+
|
127 |
+
static function cleanup( $table, $directory ){
|
128 |
+
global $wpdb;
|
129 |
+
$wpdb->query( "DROP TABLE IF EXISTS $table" );
|
130 |
+
$wpdb->query( $wpdb->prepare( "
|
131 |
DELETE FROM {$wpdb->base_prefix}bp_activity
|
132 |
WHERE component = %s
|
133 |
+
", 'album' ) );
|
134 |
+
if ( is_dir( $directory ) ){
|
135 |
+
BPMediaImporter::delete( $directory );
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
static function delete( $path ){
|
140 |
+
if ( true === is_dir( $path ) ){
|
141 |
+
$files = array_diff( scandir( $path ), array( '.', '..' ) );
|
142 |
+
|
143 |
+
foreach ( $files as $file ) {
|
144 |
+
BPMediaImporter::delete( realpath( $path ) . '/' . $file );
|
145 |
+
}
|
146 |
+
|
147 |
+
return rmdir( $path );
|
148 |
+
} else {
|
149 |
+
if ( true === is_file( $path ) ){
|
150 |
+
return unlink( $path );
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
return false;
|
155 |
+
}
|
156 |
|
157 |
}
|
app/importers/RTMediaActivityUpgrade.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Created by PhpStorm.
|
4 |
* User: ritz <ritesh.patel@rtcamp.com>
|
5 |
* Date: 11/9/14
|
6 |
* Time: 1:56 PM
|
7 |
*/
|
8 |
-
|
9 |
class RTMediaActivityUpgrade {
|
10 |
|
11 |
function __construct(){
|
12 |
-
add_filter(
|
13 |
add_action( 'admin_init', array( $this, 'add_admin_notice' ) );
|
14 |
add_action( 'admin_menu', array( $this, 'menu' ), 10 );
|
15 |
add_action( 'wp_ajax_rtmedia_activity_upgrade', array( $this, 'rtmedia_activity_upgrade' ) );
|
16 |
add_action( 'wp_ajax_rtmedia_activity_done_upgrade', array( $this, 'rtmedia_activity_done_upgrade' ) );
|
17 |
}
|
18 |
|
19 |
-
function menu()
|
20 |
add_submenu_page( 'rtmedia-setting', __( 'Media activity upgrade', 'rtmedia' ), __( 'Media activity upgrade', 'rtmedia' ), 'manage_options', 'rtmedia-activity-upgrade', array( $this, 'init' ) );
|
21 |
}
|
22 |
|
23 |
-
function rtmedia_add_admin_page_array( $admin_pages )
|
24 |
-
$admin_pages[
|
25 |
|
26 |
return $admin_pages;
|
27 |
}
|
@@ -32,20 +32,20 @@ class RTMediaActivityUpgrade {
|
|
32 |
}
|
33 |
|
34 |
function add_admin_notice(){
|
35 |
-
$pending
|
36 |
$upgrade_done = rtmedia_get_site_option( 'rtmedia_activity_done_upgrade' );
|
37 |
-
if( $upgrade_done ){
|
38 |
return;
|
39 |
}
|
40 |
if ( $pending < 0 ){
|
41 |
$pending = 0;
|
42 |
}
|
43 |
-
rtmedia_update_site_option(
|
44 |
if ( $pending > 0 ){
|
45 |
-
if ( ! ( isset
|
46 |
-
$site_option = get_site_option(
|
47 |
-
if ( ! $site_option ||
|
48 |
-
rtmedia_update_site_option(
|
49 |
add_action( 'admin_notices', array( &$this, 'add_rtmedia_media_activity_upgrade_notice' ) );
|
50 |
}
|
51 |
}
|
@@ -54,17 +54,17 @@ class RTMediaActivityUpgrade {
|
|
54 |
|
55 |
function rtmedia_activity_upgrade( $lastid = 0, $limit = 1 ){
|
56 |
global $wpdb;
|
57 |
-
$rtmedia_model
|
58 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
59 |
-
$activity_sql
|
60 |
-
if( isset( $_REQUEST['last_id'] ) )
|
61 |
$lastid = $_REQUEST['last_id'];
|
62 |
}
|
63 |
-
if( $lastid ){
|
64 |
-
$activity_sql = " SELECT *, max(privacy) as max_privacy FROM {$rtmedia_model->table_name} WHERE activity_id > " . $lastid .
|
65 |
}
|
66 |
$activity_data = $wpdb->get_results( $activity_sql );
|
67 |
-
if( is_array( $activity_data ) && !empty( $activity_data ) ){
|
68 |
$rtmedia_activity_model->insert( array( 'activity_id' => $activity_data[0]->activity_id, 'user_id' => $activity_data[0]->media_author, 'privacy' => $activity_data[0]->max_privacy ) );
|
69 |
}
|
70 |
$this->return_upgrade( $activity_data[0] );
|
@@ -82,63 +82,66 @@ class RTMediaActivityUpgrade {
|
|
82 |
$done = $total;
|
83 |
}
|
84 |
rtmedia_update_site_option( 'rtmedia_media_activity_upgrade_pending', $pending );
|
85 |
-
$pending_time = rtmedia_migrate_formatseconds( $pending ).
|
86 |
-
echo json_encode( array(
|
87 |
die();
|
88 |
}
|
89 |
|
90 |
function add_rtmedia_media_activity_upgrade_notice(){
|
91 |
if ( current_user_can( 'manage_options' ) ){
|
92 |
-
echo "<div class='error rtmedia-activity-upgrade-notice'><p><strong>rtMedia</strong>: Database table structure for rtMedia has been updated. Please <a href='" . admin_url(
|
93 |
}
|
94 |
}
|
95 |
|
96 |
function get_pending_count( $activity_id = false ){
|
97 |
global $wpdb;
|
98 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
99 |
-
$rtmedia_model
|
100 |
-
$query_pending
|
101 |
-
$last_imported
|
102 |
-
if( $last_imported ){
|
103 |
$query_pending .= " AND activity_id>{$last_imported} ";
|
104 |
}
|
105 |
$pending_count = $wpdb->get_results( $query_pending );
|
106 |
if ( $pending_count && sizeof( $pending_count ) > 0 ){
|
107 |
-
return $pending_count[
|
108 |
}
|
|
|
109 |
return 0;
|
110 |
}
|
111 |
|
112 |
function get_total_count(){
|
113 |
global $wpdb;
|
114 |
$rtmedia_model = new RTMediaModel();
|
115 |
-
$query_total
|
116 |
-
$total_count
|
117 |
if ( $total_count && sizeof( $total_count ) > 0 ){
|
118 |
-
return $total_count[
|
119 |
}
|
|
|
120 |
return 0;
|
121 |
}
|
122 |
|
123 |
function get_last_imported(){
|
124 |
global $wpdb;
|
125 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
126 |
-
$last_query
|
127 |
-
$last_imported
|
128 |
if ( $last_imported && sizeof( $last_imported ) > 0 && isset( $last_imported[0] ) && isset( $last_imported[0]->activity_id ) ){
|
129 |
-
return $last_imported[
|
130 |
}
|
|
|
131 |
return 0;
|
132 |
}
|
133 |
|
134 |
function init(){
|
135 |
-
$prog
|
136 |
-
$pending
|
137 |
-
$total
|
138 |
-
$last_id
|
139 |
-
$done
|
140 |
$admin_ajax = admin_url( 'admin-ajax.php' );
|
141 |
-
|
142 |
<div class="wrap">
|
143 |
<h2>rtMedia: Upgrade rtMedia activity</h2>
|
144 |
<?php
|
@@ -164,93 +167,93 @@ class RTMediaActivityUpgrade {
|
|
164 |
width: 0;
|
165 |
}
|
166 |
</style>
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
}
|
199 |
-
if ( data.status ) {
|
200 |
-
done = parseInt( data.done );
|
201 |
-
total = parseInt( data.total );
|
202 |
-
var progw = Math.ceil( (done / total) * 100 );
|
203 |
-
if ( progw > 100 ) {
|
204 |
-
progw = 100;
|
205 |
}
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
}
|
214 |
-
|
215 |
-
|
216 |
-
alert( "Migration
|
217 |
-
jQuery( "#
|
218 |
}
|
219 |
-
}
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
}
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
} );
|
232 |
-
if( fail_id.length > 0 ) {
|
233 |
-
rtm_show_file_error();
|
234 |
}
|
235 |
-
jQuery( "#rtMediaSyncing" ).hide();
|
236 |
}
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
<?php } ?>
|
254 |
</div>
|
255 |
<?php
|
256 |
}
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Created by PhpStorm.
|
5 |
* User: ritz <ritesh.patel@rtcamp.com>
|
6 |
* Date: 11/9/14
|
7 |
* Time: 1:56 PM
|
8 |
*/
|
|
|
9 |
class RTMediaActivityUpgrade {
|
10 |
|
11 |
function __construct(){
|
12 |
+
add_filter( 'rtmedia_filter_admin_pages_array', array( $this, 'rtmedia_add_admin_page_array' ), 11, 1 );
|
13 |
add_action( 'admin_init', array( $this, 'add_admin_notice' ) );
|
14 |
add_action( 'admin_menu', array( $this, 'menu' ), 10 );
|
15 |
add_action( 'wp_ajax_rtmedia_activity_upgrade', array( $this, 'rtmedia_activity_upgrade' ) );
|
16 |
add_action( 'wp_ajax_rtmedia_activity_done_upgrade', array( $this, 'rtmedia_activity_done_upgrade' ) );
|
17 |
}
|
18 |
|
19 |
+
function menu(){
|
20 |
add_submenu_page( 'rtmedia-setting', __( 'Media activity upgrade', 'rtmedia' ), __( 'Media activity upgrade', 'rtmedia' ), 'manage_options', 'rtmedia-activity-upgrade', array( $this, 'init' ) );
|
21 |
}
|
22 |
|
23 |
+
function rtmedia_add_admin_page_array( $admin_pages ){
|
24 |
+
$admin_pages[] = 'rtmedia_page_rtmedia-activity-upgrade';
|
25 |
|
26 |
return $admin_pages;
|
27 |
}
|
32 |
}
|
33 |
|
34 |
function add_admin_notice(){
|
35 |
+
$pending = $this->get_pending_count();
|
36 |
$upgrade_done = rtmedia_get_site_option( 'rtmedia_activity_done_upgrade' );
|
37 |
+
if ( $upgrade_done ){
|
38 |
return;
|
39 |
}
|
40 |
if ( $pending < 0 ){
|
41 |
$pending = 0;
|
42 |
}
|
43 |
+
rtmedia_update_site_option( 'rtmedia_media_activity_upgrade_pending', $pending );
|
44 |
if ( $pending > 0 ){
|
45 |
+
if ( ! ( isset( $_REQUEST['page'] ) && 'rtmedia-activity-upgrade' == $_REQUEST['page'] ) ){
|
46 |
+
$site_option = get_site_option( 'rtmedia_activity_upgrade_notice' );
|
47 |
+
if ( ! $site_option || 'hide' != $site_option ){
|
48 |
+
rtmedia_update_site_option( 'rtmedia_activity_upgrade_notice', 'show' );
|
49 |
add_action( 'admin_notices', array( &$this, 'add_rtmedia_media_activity_upgrade_notice' ) );
|
50 |
}
|
51 |
}
|
54 |
|
55 |
function rtmedia_activity_upgrade( $lastid = 0, $limit = 1 ){
|
56 |
global $wpdb;
|
57 |
+
$rtmedia_model = new RTMediaModel();
|
58 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
59 |
+
$activity_sql = " SELECT *, max(privacy) as max_privacy FROM {$rtmedia_model->table_name} WHERE activity_id is NOT NULL GROUP BY activity_id ORDER BY id limit " . $limit;
|
60 |
+
if ( isset( $_REQUEST['last_id'] ) ){
|
61 |
$lastid = $_REQUEST['last_id'];
|
62 |
}
|
63 |
+
if ( $lastid ){
|
64 |
+
$activity_sql = " SELECT *, max(privacy) as max_privacy FROM {$rtmedia_model->table_name} WHERE activity_id > " . $lastid . ' AND activity_id is NOT NULL GROUP BY activity_id ORDER BY id limit ' . $limit;
|
65 |
}
|
66 |
$activity_data = $wpdb->get_results( $activity_sql );
|
67 |
+
if ( is_array( $activity_data ) && ! empty( $activity_data ) ){
|
68 |
$rtmedia_activity_model->insert( array( 'activity_id' => $activity_data[0]->activity_id, 'user_id' => $activity_data[0]->media_author, 'privacy' => $activity_data[0]->max_privacy ) );
|
69 |
}
|
70 |
$this->return_upgrade( $activity_data[0] );
|
82 |
$done = $total;
|
83 |
}
|
84 |
rtmedia_update_site_option( 'rtmedia_media_activity_upgrade_pending', $pending );
|
85 |
+
$pending_time = rtmedia_migrate_formatseconds( $pending ) . ' (estimated)';
|
86 |
+
echo json_encode( array( 'status' => true, 'done' => $done, 'total' => $total, 'pending' => $pending_time, 'activity_id' => $activity_data->activity_id, 'imported' => $upgrade ) );
|
87 |
die();
|
88 |
}
|
89 |
|
90 |
function add_rtmedia_media_activity_upgrade_notice(){
|
91 |
if ( current_user_can( 'manage_options' ) ){
|
92 |
+
echo "<div class='error rtmedia-activity-upgrade-notice'><p><strong>rtMedia</strong>: Database table structure for rtMedia has been updated. Please <a href='" . admin_url( 'admin.php?page=rtmedia-activity-upgrade' ) . "'>Click Here</a> to upgrade rtMedia activities. </p> </div>";
|
93 |
}
|
94 |
}
|
95 |
|
96 |
function get_pending_count( $activity_id = false ){
|
97 |
global $wpdb;
|
98 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
99 |
+
$rtmedia_model = new RTMediaModel();
|
100 |
+
$query_pending = " SELECT count( DISTINCT activity_id) as pending from {$rtmedia_model->table_name} where activity_id NOT IN( SELECT activity_id from {$rtmedia_activity_model->table_name} ) AND activity_id > 0 ";
|
101 |
+
$last_imported = $this->get_last_imported();
|
102 |
+
if ( $last_imported ){
|
103 |
$query_pending .= " AND activity_id>{$last_imported} ";
|
104 |
}
|
105 |
$pending_count = $wpdb->get_results( $query_pending );
|
106 |
if ( $pending_count && sizeof( $pending_count ) > 0 ){
|
107 |
+
return $pending_count[0]->pending;
|
108 |
}
|
109 |
+
|
110 |
return 0;
|
111 |
}
|
112 |
|
113 |
function get_total_count(){
|
114 |
global $wpdb;
|
115 |
$rtmedia_model = new RTMediaModel();
|
116 |
+
$query_total = " SELECT count( DISTINCT activity_id) as total FROM {$rtmedia_model->table_name} WHERE activity_id > 0 ";
|
117 |
+
$total_count = $wpdb->get_results( $query_total );
|
118 |
if ( $total_count && sizeof( $total_count ) > 0 ){
|
119 |
+
return $total_count[0]->total;
|
120 |
}
|
121 |
+
|
122 |
return 0;
|
123 |
}
|
124 |
|
125 |
function get_last_imported(){
|
126 |
global $wpdb;
|
127 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
128 |
+
$last_query = " SELECT activity_id from {$rtmedia_activity_model->table_name} ORDER BY activity_id DESC limit 1 ";
|
129 |
+
$last_imported = $wpdb->get_results( $last_query );
|
130 |
if ( $last_imported && sizeof( $last_imported ) > 0 && isset( $last_imported[0] ) && isset( $last_imported[0]->activity_id ) ){
|
131 |
+
return $last_imported[0]->activity_id;
|
132 |
}
|
133 |
+
|
134 |
return 0;
|
135 |
}
|
136 |
|
137 |
function init(){
|
138 |
+
$prog = new rtProgress();
|
139 |
+
$pending = $this->get_pending_count();
|
140 |
+
$total = $this->get_total_count();
|
141 |
+
$last_id = $this->get_last_imported();
|
142 |
+
$done = $total - $pending;
|
143 |
$admin_ajax = admin_url( 'admin-ajax.php' );
|
144 |
+
?>
|
145 |
<div class="wrap">
|
146 |
<h2>rtMedia: Upgrade rtMedia activity</h2>
|
147 |
<?php
|
167 |
width: 0;
|
168 |
}
|
169 |
</style>
|
170 |
+
<script type="text/javascript">
|
171 |
+
var fail_id = new Array();
|
172 |
+
var ajax_data;
|
173 |
+
jQuery( document ).ready( function ( e ) {
|
174 |
+
jQuery( "#toplevel_page_rtmedia-settings" ).addClass( "wp-has-current-submenu" )
|
175 |
+
jQuery( "#toplevel_page_rtmedia-settings" ).removeClass( "wp-not-current-submenu" )
|
176 |
+
jQuery( "#toplevel_page_rtmedia-settings" ).addClass( "wp-menu-open" )
|
177 |
+
jQuery( "#toplevel_page_rtmedia-settings>a" ).addClass( "wp-menu-open" )
|
178 |
+
jQuery( "#toplevel_page_rtmedia-settings>a" ).addClass( "wp-has-current-submenu" )
|
179 |
+
if ( db_total < 1 )
|
180 |
+
jQuery( "#submit" ).attr( 'disabled', "disabled" );
|
181 |
+
} )
|
182 |
+
function db_start_migration( db_done, db_total, last_id ) {
|
183 |
|
184 |
+
if ( db_done < db_total ) {
|
185 |
+
jQuery( "#rtMediaSyncing" ).show();
|
186 |
+
ajax_data = {
|
187 |
+
"action": "rtmedia_activity_upgrade",
|
188 |
+
"done": db_done,
|
189 |
+
"last_id": last_id
|
190 |
+
}
|
191 |
+
jQuery.ajax( {
|
192 |
+
url: '<?php echo $admin_ajax; ?>',
|
193 |
+
type: 'post',
|
194 |
+
data: ajax_data,
|
195 |
+
success: function ( sdata ) {
|
196 |
|
197 |
+
try {
|
198 |
+
data = JSON.parse( sdata );
|
199 |
+
} catch ( e ) {
|
200 |
+
jQuery( "#submit" ).attr( 'disabled', "" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
+
if ( data.status ) {
|
203 |
+
done = parseInt( data.done );
|
204 |
+
total = parseInt( data.total );
|
205 |
+
var progw = Math.ceil( (done / total) * 100 );
|
206 |
+
if ( progw > 100 ) {
|
207 |
+
progw = 100;
|
208 |
+
}
|
209 |
+
;
|
210 |
+
jQuery( '#rtprogressbar>div' ).css( 'width', progw + '%' );
|
211 |
+
jQuery( 'span.finished' ).html( done );
|
212 |
+
jQuery( 'span.total' ).html( total );
|
213 |
+
jQuery( 'span.pending' ).html( data.pending );
|
214 |
+
if ( data.imported === false ) {
|
215 |
+
fail_id.push( data.activity_id );
|
216 |
+
}
|
217 |
+
db_start_migration( done, total, parseInt( data.activity_id ) );
|
218 |
+
} else {
|
219 |
+
alert( "Migration completed." );
|
220 |
+
jQuery( "#rtMediaSyncing" ).hide();
|
221 |
}
|
222 |
+
},
|
223 |
+
error: function () {
|
224 |
+
alert( "Error During Migration, Please Refresh Page then try again" );
|
225 |
+
jQuery( "#submit" ).removeAttr( 'disabled' );
|
226 |
}
|
227 |
+
} );
|
228 |
+
} else {
|
229 |
+
data = {
|
230 |
+
action: 'rtmedia_activity_done_upgrade'
|
231 |
}
|
232 |
+
jQuery.post( '<?php echo $admin_ajax; ?>', data, function () {
|
233 |
+
alert( "Database upgrade completed." );
|
234 |
+
} );
|
235 |
+
if ( fail_id.length > 0 ) {
|
236 |
+
rtm_show_file_error();
|
237 |
+
}
|
238 |
+
jQuery( "#rtMediaSyncing" ).hide();
|
|
|
|
|
|
|
239 |
}
|
|
|
240 |
}
|
241 |
+
function rtm_show_file_error() {
|
242 |
+
jQuery( 'span.pending' ).html( "Some activities are failed to upgrade, Don't worry about that." );
|
243 |
+
}
|
244 |
+
var db_done = <?php echo $done; ?>;
|
245 |
+
var db_total = <?php echo $total; ?>;
|
246 |
+
var last_id = <?php echo $last_id; ?>;
|
247 |
+
jQuery( document ).on( 'click', '#submit', function ( e ) {
|
248 |
+
e.preventDefault();
|
249 |
+
db_start_migration( db_done, db_total, last_id );
|
250 |
+
jQuery( this ).attr( 'disabled', 'disabled' );
|
251 |
+
} );
|
252 |
+
</script>
|
253 |
+
<hr/>
|
254 |
+
<?php if ( ! ( isset( $rtmedia_error ) && true === $rtmedia_error ) ){ ?>
|
255 |
+
<input type="button" id="submit" value="start" class="button button-primary"/>
|
256 |
+
<?php } ?>
|
|
|
257 |
</div>
|
258 |
<?php
|
259 |
}
|
app/importers/RTMediaMediaSizeImporter.php
CHANGED
@@ -13,26 +13,26 @@
|
|
13 |
*/
|
14 |
class RTMediaMediaSizeImporter {
|
15 |
|
16 |
-
function __construct()
|
17 |
-
add_filter(
|
18 |
-
add_action( 'wp_ajax_rtmedia_media_size_import', array( $this,
|
19 |
add_action( 'admin_init', array( $this, 'add_admin_notice' ) );
|
20 |
add_action( 'admin_menu', array( $this, 'menu' ), 10 );
|
21 |
-
add_action( 'wp_ajax_rtmedia_hide_media_size_import_notice', array( $this,
|
22 |
}
|
23 |
|
24 |
-
function menu()
|
25 |
add_submenu_page( 'rtmedia-setting', __( 'Media Size Import', 'rtmedia' ), __( 'Media Size Import', 'rtmedia' ), 'manage_options', 'rtmedia-migration-media-size-import', array( $this, 'init' ) );
|
26 |
}
|
27 |
|
28 |
-
function rtmedia_add_admin_page_array( $admin_pages )
|
29 |
-
$admin_pages[
|
30 |
|
31 |
return $admin_pages;
|
32 |
}
|
33 |
|
34 |
-
function rtmedia_hide_media_size_import_notice()
|
35 |
-
if( rtmedia_update_site_option(
|
36 |
echo '1';
|
37 |
} else {
|
38 |
echo '0';
|
@@ -40,37 +40,37 @@ class RTMediaMediaSizeImporter {
|
|
40 |
wp_die();
|
41 |
}
|
42 |
|
43 |
-
function add_admin_notice()
|
44 |
$pending = $this->get_pending_count();
|
45 |
if ( $pending < 0 ){
|
46 |
$pending = 0;
|
47 |
}
|
48 |
-
rtmedia_update_site_option(
|
49 |
$hide_admin_option = rtmedia_get_site_option( 'rtmedia_hide_media_size_import_notice' );
|
50 |
-
if( $hide_admin_option )
|
51 |
return;
|
52 |
}
|
53 |
if ( $pending > 0 ){
|
54 |
-
if ( ! ( isset
|
55 |
-
$site_option = get_site_option(
|
56 |
-
if ( ! $site_option ||
|
57 |
-
rtmedia_update_site_option(
|
58 |
add_action( 'admin_notices', array( &$this, 'add_rtmedia_media_size_import_notice' ) );
|
59 |
}
|
60 |
}
|
61 |
}
|
62 |
}
|
63 |
|
64 |
-
function add_rtmedia_media_size_import_notice()
|
65 |
if ( current_user_can( 'manage_options' ) ){
|
66 |
-
$this->create_notice( "<p><strong>rtMedia</strong>: Database table structure for rtMedia has been updated. Please <a href='" . admin_url(
|
67 |
-
|
68 |
<script type="text/javascript">
|
69 |
function rtmedia_hide_media_size_import_notice() {
|
70 |
var data = {action: 'rtmedia_hide_media_size_import_notice'};
|
71 |
jQuery.post( ajaxurl, data, function ( response ) {
|
72 |
response = response.trim();
|
73 |
-
if ( response ===
|
74 |
jQuery( '.rtmedia-media-size-import-error' ).remove();
|
75 |
} );
|
76 |
}
|
@@ -79,11 +79,11 @@ class RTMediaMediaSizeImporter {
|
|
79 |
}
|
80 |
}
|
81 |
|
82 |
-
function create_notice( $message, $type =
|
83 |
echo '<div class="' . $type . ' rtmedia-media-size-import-error">' . $message . '</div>';
|
84 |
}
|
85 |
|
86 |
-
function init()
|
87 |
$prog = new rtProgress();
|
88 |
$pending = $this->get_pending_count();
|
89 |
$total = $this->get_total_count();
|
@@ -91,14 +91,14 @@ class RTMediaMediaSizeImporter {
|
|
91 |
?>
|
92 |
<div class="wrap">
|
93 |
<h2>rtMedia: Import Media Size</h2>
|
94 |
-
|
95 |
echo '<span class="pending">' . rtmedia_migrate_formatseconds( $total - $done ) . ' (estimated)</span><br />';
|
96 |
echo '<span class="finished">' . $done . '</span>/<span class="total">' . $total . '</span>';
|
97 |
echo '<img src="images/loading.gif" alt="syncing" id="rtMediaSyncing" style="display:none" />';
|
98 |
|
99 |
$temp = $prog->progress( $done, $total );
|
100 |
$prog->progress_ui( $temp, true );
|
101 |
-
|
102 |
<script type="text/javascript">
|
103 |
var fail_id = new Array();
|
104 |
var ajax_data;
|
@@ -118,7 +118,7 @@ class RTMediaMediaSizeImporter {
|
|
118 |
ajax_data = {
|
119 |
"action": "rtmedia_media_size_import",
|
120 |
"done": db_done,
|
121 |
-
"last_id"
|
122 |
}
|
123 |
jQuery.ajax( {
|
124 |
url: rtmedia_admin_ajax,
|
@@ -143,8 +143,8 @@ class RTMediaMediaSizeImporter {
|
|
143 |
jQuery( 'span.finished' ).html( done );
|
144 |
jQuery( 'span.total' ).html( total );
|
145 |
jQuery( 'span.pending' ).html( data.pending );
|
146 |
-
if( data.imported === false ) {
|
147 |
-
fail_id.push(data.media_id);
|
148 |
}
|
149 |
db_start_migration( done, total, parseInt( data.media_id ) );
|
150 |
} else {
|
@@ -159,17 +159,17 @@ class RTMediaMediaSizeImporter {
|
|
159 |
} );
|
160 |
} else {
|
161 |
alert( "Migration completed." );
|
162 |
-
if( fail_id.length > 0 ) {
|
163 |
rtm_show_file_error();
|
164 |
}
|
165 |
jQuery( "#rtMediaSyncing" ).hide();
|
166 |
}
|
167 |
}
|
168 |
function rtm_show_file_error() {
|
169 |
-
jQuery( 'span.pending' ).html( "Media with ID: " + fail_id.join(', ') + " can not be imported. Please check your server error log for more details. Don't worry, you can end importing media size now :)" );
|
170 |
-
//
|
171 |
-
//
|
172 |
-
//
|
173 |
}
|
174 |
var db_done = <?php echo $done; ?>;
|
175 |
var db_total = <?php echo $total; ?>;
|
@@ -180,45 +180,45 @@ class RTMediaMediaSizeImporter {
|
|
180 |
} );
|
181 |
</script>
|
182 |
<hr/>
|
183 |
-
<?php if ( ! ( isset
|
184 |
<input type="button" id="submit" value="start" class="button button-primary"/>
|
185 |
<?php } ?>
|
186 |
</div>
|
187 |
<?php
|
188 |
}
|
189 |
|
190 |
-
function get_pending_count( $media_id = false )
|
191 |
global $wpdb;
|
192 |
$rtmedia_model = new RTMediaModel();
|
193 |
$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')";
|
194 |
-
if( $media_id )
|
195 |
$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') AND id > '" . $media_id . "'";
|
196 |
}
|
197 |
$pending_count = $wpdb->get_results( $query_pending );
|
198 |
if ( $pending_count && sizeof( $pending_count ) > 0 ){
|
199 |
-
return $pending_count[
|
200 |
}
|
201 |
|
202 |
return 0;
|
203 |
}
|
204 |
|
205 |
-
function get_total_count()
|
206 |
global $wpdb;
|
207 |
$rtmedia_model = new RTMediaModel();
|
208 |
$query_total = "SELECT COUNT(*) as total from {$rtmedia_model->table_name} where media_type in ('photo','video','document','music','other') ";
|
209 |
$total_count = $wpdb->get_results( $query_total );
|
210 |
if ( $total_count && sizeof( $total_count ) > 0 ){
|
211 |
-
return $total_count[
|
212 |
}
|
213 |
|
214 |
return 0;
|
215 |
}
|
216 |
|
217 |
-
function rtmedia_media_size_import( $lastid = 0, $limit = 1 )
|
218 |
global $wpdb;
|
219 |
$rtmedia_model = new RTMediaModel();
|
220 |
$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;
|
221 |
-
if( isset( $_REQUEST['last_id'] ) )
|
222 |
$lastid = $_REQUEST['last_id'];
|
223 |
}
|
224 |
if ( $lastid ){
|
@@ -226,31 +226,33 @@ class RTMediaMediaSizeImporter {
|
|
226 |
}
|
227 |
$result = $wpdb->get_results( $get_media_sql );
|
228 |
if ( $result && sizeof( $result ) > 0 ){
|
229 |
-
$migrate = $this->migrate_single_media( $result[
|
230 |
}
|
231 |
-
$this->return_migration( $result[
|
232 |
}
|
233 |
|
234 |
-
function migrate_single_media( $result )
|
235 |
global $wpdb;
|
236 |
$rtmedia_model = new RTMediaModel();
|
237 |
$attached_file = get_attached_file( $result->media_id );
|
238 |
-
$return
|
239 |
if ( file_exists( $attached_file ) ){
|
240 |
$file_size = filesize( $attached_file );
|
241 |
} else {
|
242 |
$file_size = '0';
|
243 |
-
error_log( 'rtMedia size importer: file not exist. Media ID: '
|
244 |
$return = false;
|
|
|
245 |
return false;
|
246 |
}
|
247 |
$post = get_post( $result->media_id );
|
248 |
$post_date = $post->post_date;
|
249 |
$rtmedia_model->update( array( 'upload_date' => $post_date, 'file_size' => $file_size ), array( 'id' => $result->id ) );
|
|
|
250 |
return $return;
|
251 |
}
|
252 |
|
253 |
-
function return_migration( $media, $migrate = true )
|
254 |
$total = $this->get_total_count();
|
255 |
$pending = $this->get_pending_count( $media->id );
|
256 |
$done = $total - $pending;
|
@@ -262,8 +264,8 @@ class RTMediaMediaSizeImporter {
|
|
262 |
$done = $total;
|
263 |
}
|
264 |
rtmedia_update_site_option( 'rtmedia_media_size_import_pending_count', $pending );
|
265 |
-
$pending_time = rtmedia_migrate_formatseconds( $pending ).
|
266 |
-
echo json_encode( array(
|
267 |
die();
|
268 |
}
|
269 |
}
|
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 |
+
add_action( 'wp_ajax_rtmedia_hide_media_size_import_notice', array( $this, 'rtmedia_hide_media_size_import_notice' ) );
|
22 |
}
|
23 |
|
24 |
+
function menu(){
|
25 |
add_submenu_page( 'rtmedia-setting', __( 'Media Size Import', 'rtmedia' ), __( 'Media Size Import', 'rtmedia' ), 'manage_options', 'rtmedia-migration-media-size-import', array( $this, 'init' ) );
|
26 |
}
|
27 |
|
28 |
+
function rtmedia_add_admin_page_array( $admin_pages ){
|
29 |
+
$admin_pages[] = 'rtmedia_page_rtmedia-media-size-import';
|
30 |
|
31 |
return $admin_pages;
|
32 |
}
|
33 |
|
34 |
+
function rtmedia_hide_media_size_import_notice(){
|
35 |
+
if ( rtmedia_update_site_option( 'rtmedia_hide_media_size_import_notice', true ) ){
|
36 |
echo '1';
|
37 |
} else {
|
38 |
echo '0';
|
40 |
wp_die();
|
41 |
}
|
42 |
|
43 |
+
function add_admin_notice(){
|
44 |
$pending = $this->get_pending_count();
|
45 |
if ( $pending < 0 ){
|
46 |
$pending = 0;
|
47 |
}
|
48 |
+
rtmedia_update_site_option( 'rtmedia_media_size_import_pending_count', $pending );
|
49 |
$hide_admin_option = rtmedia_get_site_option( 'rtmedia_hide_media_size_import_notice' );
|
50 |
+
if ( $hide_admin_option ){
|
51 |
return;
|
52 |
}
|
53 |
if ( $pending > 0 ){
|
54 |
+
if ( ! ( isset( $_REQUEST['page'] ) && 'rtmedia-migration-media-size-import' == $_REQUEST['page'] ) ){
|
55 |
+
$site_option = get_site_option( 'rtmedia_media_size_import_notice' );
|
56 |
+
if ( ! $site_option || 'hide' != $site_option ){
|
57 |
+
rtmedia_update_site_option( 'rtmedia_media_size_import_notice', 'show' );
|
58 |
add_action( 'admin_notices', array( &$this, 'add_rtmedia_media_size_import_notice' ) );
|
59 |
}
|
60 |
}
|
61 |
}
|
62 |
}
|
63 |
|
64 |
+
function add_rtmedia_media_size_import_notice(){
|
65 |
if ( current_user_can( 'manage_options' ) ){
|
66 |
+
$this->create_notice( "<p><strong>rtMedia</strong>: Database table structure for rtMedia has been updated. Please <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>' );
|
67 |
+
?>
|
68 |
<script type="text/javascript">
|
69 |
function rtmedia_hide_media_size_import_notice() {
|
70 |
var data = {action: 'rtmedia_hide_media_size_import_notice'};
|
71 |
jQuery.post( ajaxurl, data, function ( response ) {
|
72 |
response = response.trim();
|
73 |
+
if ( response === '1' )
|
74 |
jQuery( '.rtmedia-media-size-import-error' ).remove();
|
75 |
} );
|
76 |
}
|
79 |
}
|
80 |
}
|
81 |
|
82 |
+
function create_notice( $message, $type = 'error' ){
|
83 |
echo '<div class="' . $type . ' rtmedia-media-size-import-error">' . $message . '</div>';
|
84 |
}
|
85 |
|
86 |
+
function init(){
|
87 |
$prog = new rtProgress();
|
88 |
$pending = $this->get_pending_count();
|
89 |
$total = $this->get_total_count();
|
91 |
?>
|
92 |
<div class="wrap">
|
93 |
<h2>rtMedia: Import Media Size</h2>
|
94 |
+
<?php
|
95 |
echo '<span class="pending">' . rtmedia_migrate_formatseconds( $total - $done ) . ' (estimated)</span><br />';
|
96 |
echo '<span class="finished">' . $done . '</span>/<span class="total">' . $total . '</span>';
|
97 |
echo '<img src="images/loading.gif" alt="syncing" id="rtMediaSyncing" style="display:none" />';
|
98 |
|
99 |
$temp = $prog->progress( $done, $total );
|
100 |
$prog->progress_ui( $temp, true );
|
101 |
+
?>
|
102 |
<script type="text/javascript">
|
103 |
var fail_id = new Array();
|
104 |
var ajax_data;
|
118 |
ajax_data = {
|
119 |
"action": "rtmedia_media_size_import",
|
120 |
"done": db_done,
|
121 |
+
"last_id": last_id
|
122 |
}
|
123 |
jQuery.ajax( {
|
124 |
url: rtmedia_admin_ajax,
|
143 |
jQuery( 'span.finished' ).html( done );
|
144 |
jQuery( 'span.total' ).html( total );
|
145 |
jQuery( 'span.pending' ).html( data.pending );
|
146 |
+
if ( data.imported === false ) {
|
147 |
+
fail_id.push( data.media_id );
|
148 |
}
|
149 |
db_start_migration( done, total, parseInt( data.media_id ) );
|
150 |
} else {
|
159 |
} );
|
160 |
} else {
|
161 |
alert( "Migration completed." );
|
162 |
+
if ( fail_id.length > 0 ) {
|
163 |
rtm_show_file_error();
|
164 |
}
|
165 |
jQuery( "#rtMediaSyncing" ).hide();
|
166 |
}
|
167 |
}
|
168 |
function rtm_show_file_error() {
|
169 |
+
jQuery( 'span.pending' ).html( "Media with ID: " + fail_id.join( ', ' ) + " can not be imported. Please check your server error log for more details. Don't worry, you can end importing media size now :)" );
|
170 |
+
// var data = {action: 'rtmedia_hide_media_size_import_notice'};
|
171 |
+
// jQuery.post( ajaxurl, data, function ( response ) { } );
|
172 |
+
// jQuery( "#rtMediaSyncing" ).hide();
|
173 |
}
|
174 |
var db_done = <?php echo $done; ?>;
|
175 |
var db_total = <?php echo $total; ?>;
|
180 |
} );
|
181 |
</script>
|
182 |
<hr/>
|
183 |
+
<?php if ( ! ( isset( $rtmedia_error ) && true === $rtmedia_error ) ){ ?>
|
184 |
<input type="button" id="submit" value="start" class="button button-primary"/>
|
185 |
<?php } ?>
|
186 |
</div>
|
187 |
<?php
|
188 |
}
|
189 |
|
190 |
+
function get_pending_count( $media_id = false ){
|
191 |
global $wpdb;
|
192 |
$rtmedia_model = new RTMediaModel();
|
193 |
$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')";
|
194 |
+
if ( $media_id ){
|
195 |
$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') AND id > '" . $media_id . "'";
|
196 |
}
|
197 |
$pending_count = $wpdb->get_results( $query_pending );
|
198 |
if ( $pending_count && sizeof( $pending_count ) > 0 ){
|
199 |
+
return $pending_count[0]->pending;
|
200 |
}
|
201 |
|
202 |
return 0;
|
203 |
}
|
204 |
|
205 |
+
function get_total_count(){
|
206 |
global $wpdb;
|
207 |
$rtmedia_model = new RTMediaModel();
|
208 |
$query_total = "SELECT COUNT(*) as total from {$rtmedia_model->table_name} where media_type in ('photo','video','document','music','other') ";
|
209 |
$total_count = $wpdb->get_results( $query_total );
|
210 |
if ( $total_count && sizeof( $total_count ) > 0 ){
|
211 |
+
return $total_count[0]->total;
|
212 |
}
|
213 |
|
214 |
return 0;
|
215 |
}
|
216 |
|
217 |
+
function rtmedia_media_size_import( $lastid = 0, $limit = 1 ){
|
218 |
global $wpdb;
|
219 |
$rtmedia_model = new RTMediaModel();
|
220 |
$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;
|
221 |
+
if ( isset( $_REQUEST['last_id'] ) ){
|
222 |
$lastid = $_REQUEST['last_id'];
|
223 |
}
|
224 |
if ( $lastid ){
|
226 |
}
|
227 |
$result = $wpdb->get_results( $get_media_sql );
|
228 |
if ( $result && sizeof( $result ) > 0 ){
|
229 |
+
$migrate = $this->migrate_single_media( $result[0] );
|
230 |
}
|
231 |
+
$this->return_migration( $result[0], $migrate );
|
232 |
}
|
233 |
|
234 |
+
function migrate_single_media( $result ){
|
235 |
global $wpdb;
|
236 |
$rtmedia_model = new RTMediaModel();
|
237 |
$attached_file = get_attached_file( $result->media_id );
|
238 |
+
$return = true;
|
239 |
if ( file_exists( $attached_file ) ){
|
240 |
$file_size = filesize( $attached_file );
|
241 |
} else {
|
242 |
$file_size = '0';
|
243 |
+
error_log( 'rtMedia size importer: file not exist. Media ID: ' . $result->id . ', File: ' . $attached_file );
|
244 |
$return = false;
|
245 |
+
|
246 |
return false;
|
247 |
}
|
248 |
$post = get_post( $result->media_id );
|
249 |
$post_date = $post->post_date;
|
250 |
$rtmedia_model->update( array( 'upload_date' => $post_date, 'file_size' => $file_size ), array( 'id' => $result->id ) );
|
251 |
+
|
252 |
return $return;
|
253 |
}
|
254 |
|
255 |
+
function return_migration( $media, $migrate = true ){
|
256 |
$total = $this->get_total_count();
|
257 |
$pending = $this->get_pending_count( $media->id );
|
258 |
$done = $total - $pending;
|
264 |
$done = $total;
|
265 |
}
|
266 |
rtmedia_update_site_option( 'rtmedia_media_size_import_pending_count', $pending );
|
267 |
+
$pending_time = rtmedia_migrate_formatseconds( $pending ) . ' (estimated)';
|
268 |
+
echo json_encode( array( 'status' => true, 'done' => $done, 'total' => $total, 'pending' => $pending_time, 'media_id' => $media->id, 'imported' => $migrate ) );
|
269 |
die();
|
270 |
}
|
271 |
}
|
app/importers/RTMediaMigration.php
CHANGED
@@ -7,96 +7,102 @@
|
|
7 |
*/
|
8 |
class RTMediaMigration {
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
count(id)
|
101 |
FROM
|
102 |
{$bp_prefix}bp_activity left outer join (select distinct
|
@@ -114,14 +120,13 @@ class RTMediaMigration {
|
|
114 |
and is_spam <>1 and
|
115 |
not p.meta_value is NULL";
|
116 |
|
|
|
117 |
|
118 |
-
|
|
|
|
|
119 |
|
120 |
-
|
121 |
-
$count +=intval ( $_SESSION[ "migration_activity" ] );
|
122 |
-
}
|
123 |
-
|
124 |
-
$sql = "select count(*)
|
125 |
from
|
126 |
{$wpdb->postmeta} a
|
127 |
left join
|
@@ -136,37 +141,37 @@ class RTMediaMigration {
|
|
136 |
a.post_id > 0 and (NOT p.ID IS NULL)
|
137 |
and a.meta_key = 'bp-media-key'";
|
138 |
|
|
|
|
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
return $count;
|
144 |
-
}
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
|
150 |
-
|
151 |
-
|
152 |
from
|
153 |
{$wpdb->postmeta} a left join
|
154 |
{$wpdb->posts} p ON (a.post_id = p.ID)
|
155 |
where
|
156 |
a.meta_key = 'bp-media-key' and (NOT p.ID IS NULL) and a.post_id not in (select media_id
|
157 |
from {$this->bmp_table} where blog_id = %d and media_id <> %d ) order by a.post_ID";
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
from {$this->bmp_table} where blog_id = %d and media_id in (select a.post_id
|
171 |
from
|
172 |
{$wpdb->postmeta} a
|
@@ -182,308 +187,321 @@ class RTMediaMigration {
|
|
182 |
a.post_id > 0 and (NOT p.ID IS NULL)
|
183 |
and a.meta_key = 'bp-media-key')";
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
|
|
|
|
216 |
from $wpdb->comments a
|
217 |
where a.comment_post_ID in (select b.media_id from $this->bmp_table b left join
|
218 |
{$wpdb->posts} p ON (b.media_id = p.ID) where (NOT p.ID IS NULL) ) and a.comment_agent=''" );
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
a.post_id as 'post_id',
|
488 |
b.meta_value as 'privacy',
|
489 |
a.meta_value as 'context_id',
|
@@ -509,59 +527,54 @@ class RTMediaMigration {
|
|
509 |
order by a.post_id
|
510 |
limit %d";
|
511 |
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
// echo json_encode(array("status" => false, "done" => $done, "total" => $this->get_total_count()));
|
530 |
-
// die();
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
if ( $album !== false && ! (is_object ( $result )) ) {
|
562 |
-
$id = $wpdb->get_var ( $wpdb->prepare ( "select ID from $this->bmp_table where media_id = %d", $result ) );
|
563 |
-
if ( $id == NULL ) {
|
564 |
-
$sql = "select
|
565 |
a.post_id as 'post_id',
|
566 |
a.meta_value as 'privacy',
|
567 |
b.meta_value as 'context_id',
|
@@ -584,53 +597,56 @@ class RTMediaMigration {
|
|
584 |
where
|
585 |
a.post_id = %d and (NOT p.ID IS NULL)
|
586 |
and a.meta_key = 'bp_media_privacy'";
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
|
|
|
|
|
|
634 |
*
|
635 |
FROM
|
636 |
{$bp_prefix}bp_activity
|
@@ -644,411 +660,418 @@ class RTMediaMigration {
|
|
644 |
where
|
645 |
(NOT p.ID IS NULL) and p.ID = %d
|
646 |
and a.meta_key = 'bp_media_child_activity')", $media_id );
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
// if($photo_tag_meta && !empty($photo_tag_meta)){
|
689 |
-
// $wpdb->insert(
|
690 |
-
// $wpdb->prefix . "rt_rtm_media_meta", array(
|
691 |
-
// 'media_id' => $media_id,
|
692 |
-
// 'meta_key' => "user-tags",
|
693 |
-
// "meta_value" => maybe_serialize($photo_tag_meta)), array('%d', '%s', '%s'));
|
694 |
-
// }
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1053 |
|
1054 |
}
|
7 |
*/
|
8 |
class RTMediaMigration {
|
9 |
|
10 |
+
public $bmp_table = '';
|
11 |
+
|
12 |
+
function __construct(){
|
13 |
+
global $wpdb;
|
14 |
+
$this->bmp_table = $wpdb->base_prefix . 'rt_rtm_media';
|
15 |
+
|
16 |
+
add_action( 'admin_menu', array( $this, 'menu' ) );
|
17 |
+
add_action( 'wp_ajax_bp_media_rt_db_migration', array( $this, 'migrate_to_new_db' ) );
|
18 |
+
|
19 |
+
if ( isset( $_REQUEST['page'] ) && 'rtmedia-migration' == $_REQUEST['page'] && isset( $_REQUEST['hide'] ) && 'true' == $_REQUEST['hide'] ){
|
20 |
+
$this->hide_migration_notice();
|
21 |
+
wp_safe_redirect( $_SERVER['HTTP_REFERER'] );
|
22 |
+
}
|
23 |
+
if ( false !== rtmedia_get_site_option( 'rt_migration_hide_notice' ) ){
|
24 |
+
return true;
|
25 |
+
}
|
26 |
+
|
27 |
+
if ( isset( $_REQUEST['force'] ) && 'true' === $_REQUEST['force'] ){
|
28 |
+
$pending = false;
|
29 |
+
} else {
|
30 |
+
$pending = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( false === $pending ){
|
34 |
+
$total = $this->get_total_count();
|
35 |
+
$done = $this->get_done_count();
|
36 |
+
$pending = $total - $done;
|
37 |
+
if ( $pending < 0 ){
|
38 |
+
$pending = 0;
|
39 |
+
}
|
40 |
+
rtmedia_update_site_option( 'rtMigration-pending-count', $pending );
|
41 |
+
}
|
42 |
+
if ( $pending > 0 ){
|
43 |
+
if ( ! ( isset( $_REQUEST['page'] ) && 'rtmedia-migration' == $_REQUEST['page'] ) ){
|
44 |
+
add_action( 'admin_notices', array( &$this, 'add_migration_notice' ) );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
function hide_migration_notice(){
|
50 |
+
rtmedia_update_site_option( 'rt_migration_hide_notice', true );
|
51 |
+
}
|
52 |
+
|
53 |
+
function migrate_image_size_fix(){
|
54 |
+
if ( '' == rtmedia_get_site_option( 'rt_image_size_migration_fix', '' ) ){
|
55 |
+
global $wpdb;
|
56 |
+
$sql = $wpdb->prepare( "update $wpdb->postmeta set meta_value=replace(meta_value ,%s,%s) where meta_key = '_wp_attachment_metadata';", 'bp_media', 'rt_media' );
|
57 |
+
$wpdb->get_row( $sql );
|
58 |
+
update_option( 'rt_image_size_migration_fix', 'fix' );
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
function add_migration_notice(){
|
63 |
+
if ( current_user_can( 'manage_options' ) ){
|
64 |
+
$this->create_notice( '<p><strong>rtMedia</strong>: ' . __( 'Please Migrate your Database', 'rtmedia' ) . " <a href='" . admin_url( 'admin.php?page=rtmedia-migration&force=true' ) . "'>" . __( 'Click Here', 'rtmedia' ) . "</a>. <a href='" . admin_url( 'admin.php?page=rtmedia-migration&hide=true' ) . "' style='float:right'>" . __( 'Hide', 'rtmedia' ) . '</a> </p>' );
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
function create_notice( $message, $type = 'error' ){
|
69 |
+
echo '<div class="' . $type . '">' . $message . '</div>';
|
70 |
+
}
|
71 |
+
|
72 |
+
static function table_exists( $table ){
|
73 |
+
global $wpdb;
|
74 |
+
|
75 |
+
if ( 1 == $wpdb->query( "SHOW TABLES LIKE '" . $table . "'" ) ){
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
|
79 |
+
return false;
|
80 |
+
}
|
81 |
+
|
82 |
+
function menu(){
|
83 |
+
add_submenu_page( 'rtmedia-setting', __( 'Migration', 'rtmedia' ), __( 'Migration', 'rtmedia' ), 'manage_options', 'rtmedia-migration', array( $this, 'test' ) );
|
84 |
+
}
|
85 |
+
|
86 |
+
function get_total_count(){
|
87 |
+
global $wpdb;
|
88 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
89 |
+
$bp_prefix = bp_core_get_table_prefix();
|
90 |
+
} else {
|
91 |
+
$bp_prefix = '';
|
92 |
+
}
|
93 |
+
$sql_album_usercount = "select count(*) FROM $wpdb->usermeta where meta_key ='bp-media-default-album' ";
|
94 |
+
|
95 |
+
$_SESSION['migration_user_album'] = $wpdb->get_var( $sql_album_usercount );
|
96 |
+
$count = intval( $_SESSION['migration_user_album'] );
|
97 |
+
|
98 |
+
if ( $this->table_exists( $bp_prefix . 'bp_groups_groupmeta' ) ){
|
99 |
+
$sql_album_groupcount = "select count(*) FROM {$bp_prefix}bp_groups_groupmeta where meta_key ='bp_media_default_album'";
|
100 |
+
$_SESSION['migration_group_album'] = $wpdb->get_var( $sql_album_groupcount );
|
101 |
+
$count += intval( $_SESSION['migration_group_album'] );
|
102 |
+
}
|
103 |
+
if ( $this->table_exists( $bp_prefix . 'bp_activity' ) ){
|
104 |
+
//$sql_bpm_comment_count = "select count(*) from {$bp_prefix}bp_activity where component='activity' and type='activity_comment' and is_spam <> 1 and ;";
|
105 |
+
$sql_bpm_comment_count = "SELECT
|
106 |
count(id)
|
107 |
FROM
|
108 |
{$bp_prefix}bp_activity left outer join (select distinct
|
120 |
and is_spam <>1 and
|
121 |
not p.meta_value is NULL";
|
122 |
|
123 |
+
//echo $sql_bpm_comment_count;
|
124 |
|
125 |
+
$_SESSION['migration_activity'] = $wpdb->get_var( $sql_bpm_comment_count );
|
126 |
+
$count += intval( $_SESSION['migration_activity'] );
|
127 |
+
}
|
128 |
|
129 |
+
$sql = "select count(*)
|
|
|
|
|
|
|
|
|
130 |
from
|
131 |
{$wpdb->postmeta} a
|
132 |
left join
|
141 |
a.post_id > 0 and (NOT p.ID IS NULL)
|
142 |
and a.meta_key = 'bp-media-key'";
|
143 |
|
144 |
+
$_SESSION['migration_media'] = $wpdb->get_var( $sql );
|
145 |
+
$count += intval( $_SESSION['migration_media'] );
|
146 |
|
147 |
+
// var_dump($_SESSION);
|
148 |
+
return $count;
|
149 |
+
}
|
|
|
|
|
150 |
|
151 |
+
function get_last_imported(){
|
152 |
+
$album = rtmedia_get_site_option( 'rtmedia-global-albums' );
|
153 |
+
$album_id = $album[0];
|
154 |
|
155 |
+
global $wpdb;
|
156 |
+
$sql = "select a.post_ID
|
157 |
from
|
158 |
{$wpdb->postmeta} a left join
|
159 |
{$wpdb->posts} p ON (a.post_id = p.ID)
|
160 |
where
|
161 |
a.meta_key = 'bp-media-key' and (NOT p.ID IS NULL) and a.post_id not in (select media_id
|
162 |
from {$this->bmp_table} where blog_id = %d and media_id <> %d ) order by a.post_ID";
|
163 |
+
$sql = $wpdb->prepare( $sql, get_current_blog_id(), $album_id );
|
164 |
+
$row = $wpdb->get_row( $sql );
|
165 |
+
if ( $row ){
|
166 |
+
return $row->post_ID;
|
167 |
+
} else {
|
168 |
+
return false;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
function get_done_count( $flag = false ){
|
173 |
+
global $wpdb;
|
174 |
+
$sql = "select count(*)
|
175 |
from {$this->bmp_table} where blog_id = %d and media_id in (select a.post_id
|
176 |
from
|
177 |
{$wpdb->postmeta} a
|
187 |
a.post_id > 0 and (NOT p.ID IS NULL)
|
188 |
and a.meta_key = 'bp-media-key')";
|
189 |
|
190 |
+
$media_count = $wpdb->get_var( $wpdb->prepare( $sql, get_current_blog_id() ) );
|
191 |
+
if ( $flag ){
|
192 |
+
return $media_count - 1;
|
193 |
+
}
|
194 |
+
$state = intval( rtmedia_get_site_option( 'rtmedia-migration', '0' ) );
|
195 |
+
if ( 5 == $state ){
|
196 |
+
$album_count = intval( $_SESSION['migration_user_album'] );
|
197 |
+
$album_count += ( isset( $_SESSION['migration_group_album'] ) ) ? intval( $_SESSION['migration_group_album'] ) : 0;
|
198 |
+
} else {
|
199 |
+
if ( $state > 0 ){
|
200 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
201 |
+
$bp_prefix = bp_core_get_table_prefix();
|
202 |
+
} else {
|
203 |
+
$bp_prefix = '';
|
204 |
+
}
|
205 |
+
$pending_count = "select count(*) from $wpdb->posts where post_type='bp_media_album' and ( ID in (select meta_value FROM $wpdb->usermeta where meta_key ='bp-media-default-album') ";
|
206 |
+
if ( $this->table_exists( $bp_prefix . 'bp_groups_groupmeta' ) ){
|
207 |
+
$pending_count .= " or ID in (select meta_value FROM {$bp_prefix}bp_groups_groupmeta where meta_key ='bp_media_default_album')";
|
208 |
+
}
|
209 |
+
$pending_count .= ')';
|
210 |
+
$pending_count = $wpdb->get_var( $pending_count );
|
211 |
+
|
212 |
+
$album_count = intval( $_SESSION['migration_user_album'] );
|
213 |
+
$album_count += ( isset( $_SESSION['migration_group_album'] ) ) ? intval( $_SESSION['migration_group_album'] ) : 0;
|
214 |
+
$album_count = $album_count - intval( $pending_count );
|
215 |
+
} else {
|
216 |
+
$album_count = 0;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
if ( isset( $_SESSION['migration_activity'] ) && intval( $_SESSION['migration_media'] ) == intval( $media_count ) ){
|
220 |
+
$comment_sql = $_SESSION['migration_activity'];
|
221 |
+
} else {
|
222 |
+
$comment_sql = $wpdb->get_var( "select count(*)
|
223 |
from $wpdb->comments a
|
224 |
where a.comment_post_ID in (select b.media_id from $this->bmp_table b left join
|
225 |
{$wpdb->posts} p ON (b.media_id = p.ID) where (NOT p.ID IS NULL) ) and a.comment_agent=''" );
|
226 |
+
}
|
227 |
+
|
228 |
+
//echo $media_count . "--" . $album_count . "--" . $comment_sql;
|
229 |
+
return $media_count + $album_count + $comment_sql;
|
230 |
+
}
|
231 |
+
|
232 |
+
function return_migration(){
|
233 |
+
$total = $this->get_total_count();
|
234 |
+
$done = $this->get_done_count();
|
235 |
+
$pending = $total - $done;
|
236 |
+
if ( $pending < 0 ){
|
237 |
+
$pending = 0;
|
238 |
+
$done = $total;
|
239 |
+
}
|
240 |
+
if ( $done > $total ){
|
241 |
+
$done = $total;
|
242 |
+
}
|
243 |
+
if ( $done == $total ){
|
244 |
+
global $wp_rewrite;
|
245 |
+
//Call flush_rules() as a method of the $wp_rewrite object
|
246 |
+
$wp_rewrite->flush_rules( true );
|
247 |
+
}
|
248 |
+
rtmedia_update_site_option( 'rtMigration-pending-count', $pending );
|
249 |
+
$pending_time = $this->formatSeconds( $pending );
|
250 |
+
|
251 |
+
echo json_encode( array( 'status' => true, 'done' => $done, 'total' => $total, 'pending' => $pending_time ) );
|
252 |
+
die();
|
253 |
+
}
|
254 |
+
|
255 |
+
function manage_album(){
|
256 |
+
$album = rtmedia_get_site_option( 'rtmedia-global-albums' );
|
257 |
+
$stage = intval( rtmedia_get_site_option( 'rtmedia-migration', '0' ) );
|
258 |
+
|
259 |
+
$album_rt_id = $album[0];
|
260 |
+
|
261 |
+
$album_post_type = 'rtmedia_album';
|
262 |
+
|
263 |
+
global $wpdb;
|
264 |
+
|
265 |
+
$album_id = $wpdb->get_var( $wpdb->prepare( "select media_id from $this->bmp_table where id = %d", $album_rt_id ) );
|
266 |
+
|
267 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
268 |
+
$bp_prefix = bp_core_get_table_prefix();
|
269 |
+
} else {
|
270 |
+
$bp_prefix = '';
|
271 |
+
}
|
272 |
+
|
273 |
+
if ( $stage < 1 ){
|
274 |
+
global $wpdb;
|
275 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
276 |
+
$bp_prefix = bp_core_get_table_prefix();
|
277 |
+
} else {
|
278 |
+
$bp_prefix = '';
|
279 |
+
}
|
280 |
+
$sql = $wpdb->prepare( "update {$bp_prefix}bp_activity set content=replace(content,%s,%s) where id > 0;", '<ul class="bp-media-list-media">', '<div class="rtmedia-activity-container"><ul class="rtmedia-list large-block-grid-3">' );
|
281 |
+
$wpdb->get_row( $sql );
|
282 |
+
$sql = $wpdb->prepare( "update {$bp_prefix}bp_activity set content=replace(content,%s,%s) where id > 0;", '</ul>', '</ul></div>' );
|
283 |
+
$wpdb->get_row( $sql );
|
284 |
+
|
285 |
+
$sql_group = "update $wpdb->posts set post_parent='{$album_id}' where post_parent in (select meta_value FROM $wpdb->usermeta where meta_key ='bp-media-default-album') ";
|
286 |
+
if ( $this->table_exists( $bp_prefix . 'bp_groups_groupmeta' ) ){
|
287 |
+
$sql_group .= " or post_parent in (select meta_value FROM {$bp_prefix}bp_groups_groupmeta where meta_key ='bp_media_default_album')";
|
288 |
+
}
|
289 |
+
$wpdb->query( $sql_group );
|
290 |
+
$stage = 1;
|
291 |
+
rtmedia_update_site_option( 'rtmedia-migration', $stage );
|
292 |
+
$this->return_migration();
|
293 |
+
}
|
294 |
+
if ( $stage < 2 ){
|
295 |
+
$sql_delete = "select * from $wpdb->posts where post_type='bp_media_album' and ID in (select meta_value FROM $wpdb->usermeta where meta_key ='bp-media-default-album') limit 10";
|
296 |
+
$results = $wpdb->get_results( $sql_delete );
|
297 |
+
$delete_ids = '';
|
298 |
+
$sep = '';
|
299 |
+
foreach ( $results as $result ) {
|
300 |
+
$this->search_and_replace( $result->guid, trailingslashit( get_rtmedia_user_link( $result->post_author ) ) . RTMEDIA_MEDIA_SLUG . '/' . $album_rt_id );
|
301 |
+
$delete_ids .= $sep . $result->ID;
|
302 |
+
$sep = ',';
|
303 |
+
}
|
304 |
+
if ( '' != $delete_ids ){
|
305 |
+
$wpdb->query( "delete from $wpdb->posts where ID in ({$delete_ids})" );
|
306 |
+
}
|
307 |
+
if ( count( $results ) < 10 ){
|
308 |
+
$stage = 2;
|
309 |
+
}
|
310 |
+
rtmedia_update_site_option( 'rtmedia-migration', $stage );
|
311 |
+
$this->return_migration();
|
312 |
+
}
|
313 |
+
if ( $stage < 3 ){
|
314 |
+
if ( $this->table_exists( $bp_prefix . 'bp_groups_groupmeta' ) ){
|
315 |
+
$sql_delete = "select * from $wpdb->posts where post_type='bp_media_album' and ID in (select meta_value FROM {$bp_prefix}bp_groups_groupmeta where meta_key ='bp_media_default_album') limit 10";
|
316 |
+
$results = $wpdb->get_results( $sql_delete );
|
317 |
+
$delete_ids = '';
|
318 |
+
$sep = '';
|
319 |
+
if ( $results ){
|
320 |
+
foreach ( $results as $result ) {
|
321 |
+
$group_id = abs( intval( get_post_meta( $result->ID, 'bp-media-key', true ) ) );
|
322 |
+
$this->search_and_replace( trailingslashit( get_rtmedia_group_link( $group_id ) ) . 'albums/' . $result->ID, trailingslashit( get_rtmedia_group_link( $group_id ) ) . RTMEDIA_MEDIA_SLUG . '/' . $album_rt_id );
|
323 |
+
$delete_ids .= $sep . $result->ID;
|
324 |
+
$sep = ',';
|
325 |
+
}
|
326 |
+
if ( '' != $delete_ids ){
|
327 |
+
$wpdb->query( "delete from $wpdb->posts where ID in ({$delete_ids})" );
|
328 |
+
}
|
329 |
+
if ( count( $results ) < 10 ){
|
330 |
+
$stage = 3;
|
331 |
+
}
|
332 |
+
} else {
|
333 |
+
$stage = 3;
|
334 |
+
}
|
335 |
+
rtmedia_update_site_option( 'rtmedia-migration', $stage );
|
336 |
+
$this->return_migration();
|
337 |
+
} else {
|
338 |
+
$stage = 3;
|
339 |
+
rtmedia_update_site_option( 'rtmedia-migration', $stage );
|
340 |
+
$this->return_migration();
|
341 |
+
}
|
342 |
+
}
|
343 |
+
|
344 |
+
$sql = "update $wpdb->posts set post_type='{$album_post_type}' where post_type='bp_media_album'";
|
345 |
+
if ( false !== $wpdb->query( $sql ) ){
|
346 |
+
rtmedia_update_site_option( 'rtmedia-migration', '5' );
|
347 |
+
|
348 |
+
return true;
|
349 |
+
}
|
350 |
+
|
351 |
+
return false;
|
352 |
+
}
|
353 |
+
|
354 |
+
function test(){
|
355 |
+
if ( ! $this->table_exists( $this->bmp_table ) ){
|
356 |
+
$obj = new RTDBUpdate( false, RTMEDIA_PATH . 'index.php', RTMEDIA_PATH . 'app/schema/', true );
|
357 |
+
$obj->install_db_version = '0';
|
358 |
+
$obj->do_upgrade( true );
|
359 |
+
}
|
360 |
+
global $rtmedia_error;
|
361 |
+
if ( isset( $rtmedia_error ) && true === $rtmedia_error ){
|
362 |
+
?>
|
363 |
+
<div class="error"><p> Please Resolve create database error before migration.</p></div>
|
364 |
+
<?php
|
365 |
+
}
|
366 |
+
|
367 |
+
$prog = new rtProgress();
|
368 |
+
$total = $this->get_total_count();
|
369 |
+
$done = $this->get_done_count();
|
370 |
+
if ( $done >= $total ){
|
371 |
+
$done = $total;
|
372 |
+
} else {
|
373 |
+
?>
|
374 |
+
<div class="error">
|
375 |
+
<p><?php _e( 'Please Backup your <strong>DATABASE</strong> and <strong>UPLOAD</strong> folder before Migration.', 'rtmedia' ); ?></p>
|
376 |
+
</div>
|
377 |
+
<?php
|
378 |
+
}
|
379 |
+
?>
|
380 |
+
|
381 |
+
<div class="wrap">
|
382 |
+
|
383 |
+
<h2><?php _e( 'rtMedia Migration', 'rtmedia' ); ?></h2>
|
384 |
+
|
385 |
+
<h3><?php _e( 'It will migrate following things', 'rtmedia' ); ?> </h3>
|
386 |
+
User Albums : <?php echo $_SESSION['migration_user_album']; ?><br/>
|
387 |
+
<?php if ( isset( $_SESSION['migration_group_album'] ) ){ ?>
|
388 |
+
Groups Albums : <?php echo $_SESSION['migration_group_album']; ?><br/>
|
389 |
+
<?php } ?>
|
390 |
+
Media : <?php echo $_SESSION['migration_media']; ?><br/>
|
391 |
+
<?php if ( isset( $_SESSION['migration_activity'] ) ){ ?>
|
392 |
+
Comments : <?php echo $_SESSION['migration_activity']; ?><br/>
|
393 |
+
<?php } ?>
|
394 |
+
<hr/>
|
395 |
+
|
396 |
+
<?php
|
397 |
+
echo '<span class="pending">' . $this->formatSeconds( $total - $done ) . '</span><br />';
|
398 |
+
echo '<span class="finished">' . $done . '</span>/<span class="total">' . $total . '</span>';
|
399 |
+
echo '<img src="images/loading.gif" alt="syncing" id="rtMediaSyncing" style="display:none" />';
|
400 |
+
|
401 |
+
$temp = $prog->progress( $done, $total );
|
402 |
+
$prog->progress_ui( $temp, true );
|
403 |
+
?>
|
404 |
+
<script type="text/javascript">
|
405 |
+
jQuery( document ).ready( function ( e ) {
|
406 |
+
jQuery( "#toplevel_page_rtmedia-settings" ).addClass( "wp-has-current-submenu" )
|
407 |
+
jQuery( "#toplevel_page_rtmedia-settings" ).removeClass( "wp-not-current-submenu" )
|
408 |
+
jQuery( "#toplevel_page_rtmedia-settings" ).addClass( "wp-menu-open" )
|
409 |
+
jQuery( "#toplevel_page_rtmedia-settings>a" ).addClass( "wp-menu-open" )
|
410 |
+
jQuery( "#toplevel_page_rtmedia-settings>a" ).addClass( "wp-has-current-submenu" )
|
411 |
+
|
412 |
+
if ( db_total < 1 )
|
413 |
+
jQuery( "#submit" ).attr( 'disabled', "disabled" );
|
414 |
+
} )
|
415 |
+
function db_start_migration( db_done, db_total ) {
|
416 |
+
|
417 |
+
|
418 |
+
if ( db_done < db_total ) {
|
419 |
+
jQuery( "#rtMediaSyncing" ).show();
|
420 |
+
jQuery.ajax( {
|
421 |
+
url: rtmedia_admin_ajax,
|
422 |
+
type: 'post',
|
423 |
+
data: {
|
424 |
+
"action": "bp_media_rt_db_migration",
|
425 |
+
"done": db_done
|
426 |
+
},
|
427 |
+
success: function ( sdata ) {
|
428 |
+
|
429 |
+
try {
|
430 |
+
data = JSON.parse( sdata );
|
431 |
+
} catch ( e ) {
|
432 |
+
jQuery( "#submit" ).attr( 'disabled', "" );
|
433 |
+
}
|
434 |
+
if ( data.status ) {
|
435 |
+
done = parseInt( data.done );
|
436 |
+
total = parseInt( data.total );
|
437 |
+
var progw = Math.ceil( (done / total) * 100 );
|
438 |
+
if ( progw > 100 ) {
|
439 |
+
progw = 100;
|
440 |
+
}
|
441 |
+
;
|
442 |
+
jQuery( '#rtprogressbar>div' ).css( 'width', progw + '%' );
|
443 |
+
jQuery( 'span.finished' ).html( done );
|
444 |
+
jQuery( 'span.total' ).html( total );
|
445 |
+
jQuery( 'span.pending' ).html( data.pending );
|
446 |
+
db_start_migration( done, total );
|
447 |
+
} else {
|
448 |
+
alert( "Migration completed." );
|
449 |
+
jQuery( "#rtMediaSyncing" ).hide();
|
450 |
+
}
|
451 |
+
},
|
452 |
+
error: function () {
|
453 |
+
alert( "<?php _e( 'Error During Migration, Please Refresh Page then try again', 'rtmedia' ); ?>" );
|
454 |
+
jQuery( "#submit" ).removeAttr( 'disabled' );
|
455 |
+
}
|
456 |
+
} );
|
457 |
+
} else {
|
458 |
+
alert( "Migration completed." );
|
459 |
+
jQuery( "#rtMediaSyncing" ).hide();
|
460 |
+
}
|
461 |
+
}
|
462 |
+
var db_done = <?php echo $done; ?>;
|
463 |
+
var db_total = <?php echo $total; ?>;
|
464 |
+
jQuery( document ).on( 'click', '#submit', function ( e ) {
|
465 |
+
e.preventDefault();
|
466 |
+
|
467 |
+
db_start_migration( db_done, db_total );
|
468 |
+
jQuery( this ).attr( 'disabled', 'disabled' );
|
469 |
+
} );
|
470 |
+
</script>
|
471 |
+
<hr/>
|
472 |
+
<?php if ( ! ( isset( $rtmedia_error ) && true === $rtmedia_error ) ){ ?>
|
473 |
+
<input type="button" id="submit" value="<?php esc_attr_e( 'Start', 'rtmedia' ); ?>"
|
474 |
+
class="button button-primary"/>
|
475 |
+
<?php } ?>
|
476 |
+
|
477 |
+
</div>
|
478 |
+
<?php
|
479 |
+
}
|
480 |
+
|
481 |
+
function migrate_to_new_db( $lastid = 0, $limit = 1 ){
|
482 |
+
|
483 |
+
if ( ! isset( $_SESSION['migration_media'] ) ){
|
484 |
+
$this->get_total_count();
|
485 |
+
}
|
486 |
+
|
487 |
+
$state = intval( rtmedia_get_site_option( 'rtmedia-migration' ) );
|
488 |
+
if ( $state < 5 ){
|
489 |
+
if ( $this->manage_album() ){
|
490 |
+
$this->migrate_encoding_options();
|
491 |
+
$this->return_migration();
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
if ( intval( $_SESSION['migration_media'] ) >= $this->get_done_count( true ) ){
|
496 |
+
|
497 |
+
if ( ! $lastid ){
|
498 |
+
$lastid = $this->get_last_imported();
|
499 |
+
if ( ! $lastid ){
|
500 |
+
$this->return_migration();
|
501 |
+
}
|
502 |
+
}
|
503 |
+
global $wpdb;
|
504 |
+
$sql = "select
|
505 |
a.post_id as 'post_id',
|
506 |
b.meta_value as 'privacy',
|
507 |
a.meta_value as 'context_id',
|
527 |
order by a.post_id
|
528 |
limit %d";
|
529 |
|
530 |
+
$results = $wpdb->get_results( $wpdb->prepare( $sql, $lastid, $limit ) );
|
531 |
+
|
532 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
533 |
+
$bp_prefix = bp_core_get_table_prefix();
|
534 |
+
} else {
|
535 |
+
$bp_prefix = '';
|
536 |
+
}
|
537 |
+
if ( $results ){
|
538 |
+
|
539 |
+
foreach ( $results as $result ) {
|
540 |
+
$this->migrate_single_media( $result );
|
541 |
+
}
|
542 |
+
}
|
543 |
+
} else {
|
544 |
+
global $wp_rewrite;
|
545 |
+
//Call flush_rules() as a method of the $wp_rewrite object
|
546 |
+
$wp_rewrite->flush_rules( true );
|
547 |
+
// echo json_encode(array("status" => false, "done" => $done, "total" => $this->get_total_count()));
|
548 |
+
// die();
|
549 |
+
}
|
550 |
+
$this->return_migration();
|
551 |
+
}
|
552 |
+
|
553 |
+
function migrate_encoding_options(){
|
554 |
+
$encoding_mnigration_array = array(
|
555 |
+
'bp-media-encoding-api-key' => 'rtmedia-encoding-api-key', 'bp-media-encoding-usage-limit-mail' => 'rtmedia-encoding-usage-limit-mail', 'bp-media-encoding-usage' => 'rtmedia-encoding-usage', 'bpmedia_encoding_service_notice' => 'rtmedia-encoding-service-notice', 'bpmedia_encoding_expansion_notice' => 'rtmedia-encoding-expansion-notice', 'bp_media_ffmpeg_options' => 'rtmedia-ffmpeg-options', 'bp_media_kaltura_options' => 'rtmedia-kaltura-options',
|
556 |
+
);
|
557 |
+
foreach ( $encoding_mnigration_array as $key => $ma ) {
|
558 |
+
if ( false !== ( $value = rtmedia_get_site_option( $key ) ) ){
|
559 |
+
rtmedia_update_site_option( $ma, $value );
|
560 |
+
}
|
561 |
+
}
|
562 |
+
}
|
563 |
+
|
564 |
+
function migrate_single_media( $result, $album = false ){
|
565 |
+
$blog_id = get_current_blog_id();
|
566 |
+
$old = $result;
|
567 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
568 |
+
$bp_prefix = bp_core_get_table_prefix();
|
569 |
+
} else {
|
570 |
+
$bp_prefix = '';
|
571 |
+
}
|
572 |
+
global $wpdb;
|
573 |
+
|
574 |
+
if ( false !== $album && ! ( is_object( $result ) ) ){
|
575 |
+
$id = $wpdb->get_var( $wpdb->prepare( "select ID from $this->bmp_table where media_id = %d", $result ) );
|
576 |
+
if ( null == $id ){
|
577 |
+
$sql = "select
|
|
|
|
|
|
|
|
|
|
|
578 |
a.post_id as 'post_id',
|
579 |
a.meta_value as 'privacy',
|
580 |
b.meta_value as 'context_id',
|
597 |
where
|
598 |
a.post_id = %d and (NOT p.ID IS NULL)
|
599 |
and a.meta_key = 'bp_media_privacy'";
|
600 |
+
$result = $wpdb->get_row( $wpdb->prepare( $sql, $result ) );
|
601 |
+
} else {
|
602 |
+
return $id;
|
603 |
+
}
|
604 |
+
}
|
605 |
+
if ( ! isset( $result ) || ! isset( $result->post_id ) ){
|
606 |
+
return $old;
|
607 |
+
}
|
608 |
+
$media_id = $result->post_id;
|
609 |
+
|
610 |
+
if ( intval( $result->context_id ) > 0 ){
|
611 |
+
$media_context = 'profile';
|
612 |
+
$prefix = 'users/' . abs( intval( $result->context_id ) );
|
613 |
+
} else {
|
614 |
+
$media_context = 'group';
|
615 |
+
$prefix = bp_get_groups_root_slug() . abs( intval( $result->context_id ) );
|
616 |
+
}
|
617 |
+
|
618 |
+
$old_type = '';
|
619 |
+
if ( 'attachment' != $result->post_type ){
|
620 |
+
$media_type = 'album';
|
621 |
+
} else {
|
622 |
+
$mime_type = strtolower( $result->post_mime_type );
|
623 |
+
$old_type = '';
|
624 |
+
if ( 0 === strpos( $mime_type, 'image' ) ){
|
625 |
+
$media_type = 'photo';
|
626 |
+
$old_type = 'photos';
|
627 |
+
} else {
|
628 |
+
if ( 0 === strpos( $mime_type, 'audio' ) ){
|
629 |
+
$media_type = 'music';
|
630 |
+
$old_type = 'music';
|
631 |
+
} else {
|
632 |
+
if ( 0 === strpos( $mime_type, 'video' ) ){
|
633 |
+
$media_type = 'video';
|
634 |
+
$old_type = 'videos';
|
635 |
+
} else {
|
636 |
+
$media_type = 'other';
|
637 |
+
}
|
638 |
+
}
|
639 |
+
}
|
640 |
+
}
|
641 |
+
|
642 |
+
$activity_data = $wpdb->get_row( $wpdb->prepare( "select * from {$bp_prefix}bp_activity where id= %d", $result->activity_id ) );
|
643 |
+
if ( 'album' != $media_type ){
|
644 |
+
$this->importmedia( $media_id, $prefix );
|
645 |
+
}
|
646 |
+
|
647 |
+
if ( $this->table_exists( $bp_prefix . 'bp_activity' ) && class_exists( 'BP_Activity_Activity' ) ){
|
648 |
+
$bp_activity = new BP_Activity_Activity();
|
649 |
+
$activity_sql = $wpdb->prepare( "SELECT
|
650 |
*
|
651 |
FROM
|
652 |
{$bp_prefix}bp_activity
|
660 |
where
|
661 |
(NOT p.ID IS NULL) and p.ID = %d
|
662 |
and a.meta_key = 'bp_media_child_activity')", $media_id );
|
663 |
+
$all_activity = $wpdb->get_results( $activity_sql );
|
664 |
+
remove_all_actions( 'wp_insert_comment' );
|
665 |
+
foreach ( $all_activity as $activity ) {
|
666 |
+
$comments = $bp_activity->get_activity_comments( $activity->id, $activity->mptt_left, $activity->mptt_right );
|
667 |
+
$exclude = get_post_meta( $media_id, 'rtmedia_imported_activity', true );
|
668 |
+
if ( ! is_array( $exclude ) ){
|
669 |
+
$exclude = array();
|
670 |
+
}
|
671 |
+
if ( $comments ){
|
672 |
+
$this->insert_comment( $media_id, $comments, $exclude );
|
673 |
+
}
|
674 |
+
}
|
675 |
+
}
|
676 |
+
if ( 0 !== intval( $result->parent ) ){
|
677 |
+
$album_id = $this->migrate_single_media( $result->parent, true );
|
678 |
+
} else {
|
679 |
+
$album_id = 0;
|
680 |
+
}
|
681 |
+
if ( function_exists( 'bp_activity_get_meta' ) ){
|
682 |
+
$likes = bp_activity_get_meta( $result->activity_id, 'favorite_count' );
|
683 |
+
} else {
|
684 |
+
$likes = 0;
|
685 |
+
}
|
686 |
+
|
687 |
+
$wpdb->insert( $this->bmp_table, array(
|
688 |
+
'blog_id' => $blog_id,
|
689 |
+
'media_id' => $media_id,
|
690 |
+
'media_type' => $media_type,
|
691 |
+
'context' => $media_context,
|
692 |
+
'context_id' => abs( intval( $result->context_id ) ),
|
693 |
+
'activity_id' => $result->activity_id,
|
694 |
+
'privacy' => intval( $result->privacy ) * 10,
|
695 |
+
'media_author' => $result->media_author,
|
696 |
+
'media_title' => $result->media_title,
|
697 |
+
'album_id' => $album_id,
|
698 |
+
'likes' => $likes,
|
699 |
+
), array( '%d', '%d', '%s', '%s', '%d', '%d', '%d', '%d', '%s', '%d', '%d' ) );
|
700 |
+
$last_id = $wpdb->insert_id;
|
701 |
+
|
702 |
+
// Photo tag meta migration
|
703 |
+
//$photo_tag_meta = get_post_meta($media_id, "bp-media-user-tags", true);
|
704 |
+
// if($photo_tag_meta && !empty($photo_tag_meta)){
|
705 |
+
// $wpdb->insert(
|
706 |
+
// $wpdb->prefix . "rt_rtm_media_meta", array(
|
707 |
+
// 'media_id' => $media_id,
|
708 |
+
// 'meta_key' => "user-tags",
|
709 |
+
// "meta_value" => maybe_serialize($photo_tag_meta)), array('%d', '%s', '%s'));
|
710 |
+
// }
|
711 |
+
if ( 'album' != $media_type && function_exists( 'bp_core_get_user_domain' ) && $activity_data ){
|
712 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
713 |
+
$bp_prefix = bp_core_get_table_prefix();
|
714 |
+
} else {
|
715 |
+
$bp_prefix = '';
|
716 |
+
}
|
717 |
+
|
718 |
+
$activity_data->old_primary_link = $activity_data->primary_link;
|
719 |
+
$parent_link = get_rtmedia_user_link( $activity_data->user_id );
|
720 |
+
$activity_data->primary_link = $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $last_id;
|
721 |
+
$this->search_and_replace( $activity_data->old_primary_link, $activity_data->primary_link );
|
722 |
+
$activity_data->action = str_replace( $activity_data->old_primary_link, $activity_data->primary_link, $activity_data->action );
|
723 |
+
$activity_data->content = str_replace( $activity_data->old_primary_link, $activity_data->primary_link, $activity_data->content );
|
724 |
+
global $last_baseurl, $last_newurl;
|
725 |
+
|
726 |
+
$replace_img = $last_newurl; //$last_baseurl . "rtMedia/$prefix/";
|
727 |
+
if ( false === strpos( $activity_data->content, $replace_img ) ){
|
728 |
+
$activity_data->content = str_replace( $last_baseurl, $replace_img, $activity_data->content );
|
729 |
+
}
|
730 |
+
global $wpdb;
|
731 |
+
$wpdb->update( $bp_prefix . 'bp_activity', array(
|
732 |
+
'primary_link' => $activity_data->primary_link, 'action' => $activity_data->action, 'content' => $activity_data->content,
|
733 |
+
), array( 'id' => $activity_data->id ) );
|
734 |
+
} else {
|
735 |
+
if ( 'group' == $media_context ){
|
736 |
+
$activity_data->old_primary_link = $activity_data->primary_link;
|
737 |
+
$parent_link = get_rtmedia_group_link( abs( intval( $result->context_id ) ) );
|
738 |
+
$parent_link = trailingslashit( $parent_link );
|
739 |
+
$activity_data->primary_link = trailingslashit( $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $last_id );
|
740 |
+
$this->search_and_replace( $activity_data->old_primary_link, $activity_data->primary_link );
|
741 |
+
} else {
|
742 |
+
$activity_data->old_primary_link = $activity_data->primary_link;
|
743 |
+
$parent_link = get_rtmedia_user_link( $activity_data->user_id );
|
744 |
+
$parent_link = trailingslashit( $parent_link );
|
745 |
+
$activity_data->primary_link = trailingslashit( $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $last_id );
|
746 |
+
$this->search_and_replace( $activity_data->old_primary_link, $activity_data->primary_link );
|
747 |
+
}
|
748 |
+
}
|
749 |
+
if ( '' != $old_type ){
|
750 |
+
if ( 'group' == $media_context ){
|
751 |
+
$parent_link = get_rtmedia_group_link( abs( intval( $result->context_id ) ) );
|
752 |
+
$parent_link = trailingslashit( $parent_link );
|
753 |
+
$this->search_and_replace( trailingslashit( $parent_link . $old_type . '/' . $media_id ), trailingslashit( $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $last_id ) );
|
754 |
+
} else {
|
755 |
+
$parent_link = get_rtmedia_user_link( $activity_data->user_id );
|
756 |
+
$parent_link = trailingslashit( $parent_link );
|
757 |
+
$this->search_and_replace( trailingslashit( $parent_link . $old_type . '/' . $media_id ), trailingslashit( $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $last_id ) );
|
758 |
+
}
|
759 |
+
}
|
760 |
+
|
761 |
+
return $last_id;
|
762 |
+
}
|
763 |
+
|
764 |
+
function importmedia( $id, $prefix ){
|
765 |
+
|
766 |
+
$delete = false;
|
767 |
+
$attached_file = get_attached_file( $id );
|
768 |
+
$attached_file_option = get_post_meta( $id, '_wp_attached_file', true );
|
769 |
+
$basename = wp_basename( $attached_file );
|
770 |
+
$file_folder_path = trailingslashit( str_replace( $basename, '', $attached_file ) );
|
771 |
+
|
772 |
+
$siteurl = get_option( 'siteurl' );
|
773 |
+
$upload_path = trim( get_option( 'upload_path' ) );
|
774 |
+
|
775 |
+
if ( empty( $upload_path ) || 'wp-content/uploads' == $upload_path ){
|
776 |
+
$dir = WP_CONTENT_DIR . '/uploads';
|
777 |
+
} elseif ( 0 !== strpos( $upload_path, ABSPATH ) ) {
|
778 |
+
// $dir is absolute, $upload_path is (maybe) relative to ABSPATH
|
779 |
+
$dir = path_join( ABSPATH, $upload_path );
|
780 |
+
} else {
|
781 |
+
$dir = $upload_path;
|
782 |
+
}
|
783 |
+
|
784 |
+
if ( ! $url = get_option( 'upload_url_path' ) ){
|
785 |
+
if ( empty( $upload_path ) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ){
|
786 |
+
$url = WP_CONTENT_URL . '/uploads';
|
787 |
+
} else {
|
788 |
+
$url = trailingslashit( $siteurl ) . $upload_path;
|
789 |
+
}
|
790 |
+
}
|
791 |
+
|
792 |
+
// Obey the value of UPLOADS. This happens as long as ms-files rewriting is disabled.
|
793 |
+
// We also sometimes obey UPLOADS when rewriting is enabled -- see the next block.
|
794 |
+
if ( defined( 'UPLOADS' ) && ! ( is_multisite() && rtmedia_get_site_option( 'ms_files_rewriting' ) ) ){
|
795 |
+
$dir = ABSPATH . UPLOADS;
|
796 |
+
$url = trailingslashit( $siteurl ) . UPLOADS;
|
797 |
+
}
|
798 |
+
|
799 |
+
// If multisite (and if not the main site in a post-MU network)
|
800 |
+
if ( is_multisite() && ! ( is_main_site() && defined( 'MULTISITE' ) ) ){
|
801 |
+
|
802 |
+
if ( ! rtmedia_get_site_option( 'ms_files_rewriting' ) ){
|
803 |
+
// If ms-files rewriting is disabled (networks created post-3.5), it is fairly straightforward:
|
804 |
+
// Append sites/%d if we're not on the main site (for post-MU networks). (The extra directory
|
805 |
+
// prevents a four-digit ID from conflicting with a year-based directory for the main site.
|
806 |
+
// But if a MU-era network has disabled ms-files rewriting manually, they don't need the extra
|
807 |
+
// directory, as they never had wp-content/uploads for the main site.)
|
808 |
+
|
809 |
+
if ( defined( 'MULTISITE' ) ){
|
810 |
+
$ms_dir = '/sites/' . get_current_blog_id();
|
811 |
+
} else {
|
812 |
+
$ms_dir = '/' . get_current_blog_id();
|
813 |
+
}
|
814 |
+
|
815 |
+
$dir .= $ms_dir;
|
816 |
+
$url .= $ms_dir;
|
817 |
+
} elseif ( defined( 'UPLOADS' ) && ! ms_is_switched() ) {
|
818 |
+
// Handle the old-form ms-files.php rewriting if the network still has that enabled.
|
819 |
+
// When ms-files rewriting is enabled, then we only listen to UPLOADS when:
|
820 |
+
// 1) we are not on the main site in a post-MU network,
|
821 |
+
// as wp-content/uploads is used there, and
|
822 |
+
// 2) we are not switched, as ms_upload_constants() hardcodes
|
823 |
+
// these constants to reflect the original blog ID.
|
824 |
+
//
|
825 |
+
// Rather than UPLOADS, we actually use BLOGUPLOADDIR if it is set, as it is absolute.
|
826 |
+
// (And it will be set, see ms_upload_constants().) Otherwise, UPLOADS can be used, as
|
827 |
+
// as it is relative to ABSPATH. For the final piece: when UPLOADS is used with ms-files
|
828 |
+
// rewriting in multisite, the resulting URL is /files. (#WP22702 for background.)
|
829 |
+
|
830 |
+
if ( defined( 'BLOGUPLOADDIR' ) ){
|
831 |
+
$dir = untrailingslashit( BLOGUPLOADDIR );
|
832 |
+
} else {
|
833 |
+
$dir = ABSPATH . UPLOADS;
|
834 |
+
}
|
835 |
+
$url = trailingslashit( $siteurl ) . 'files';
|
836 |
+
}
|
837 |
+
}
|
838 |
+
|
839 |
+
$basedir = trailingslashit( $dir );
|
840 |
+
$baseurl = trailingslashit( $url );
|
841 |
+
|
842 |
+
$new_file_folder_path = trailingslashit( str_replace( $basedir, $basedir . "rtMedia/$prefix/", $file_folder_path ) );
|
843 |
+
|
844 |
+
$year_month = untrailingslashit( str_replace( $basedir, '', $file_folder_path ) );
|
845 |
+
|
846 |
+
$metadata = wp_get_attachment_metadata( $id );
|
847 |
+
$backup_metadata = get_post_meta( $id, '_wp_attachment_backup_sizes', true );
|
848 |
+
$instagram_thumbs = get_post_meta( $id, '_instagram_thumbs', true );
|
849 |
+
$instagram_full_images = get_post_meta( $id, '_instagram_full_images', true );
|
850 |
+
$instagram_metadata = get_post_meta( $id, '_instagram_metadata', true );
|
851 |
+
$encoding_job_id = get_post_meta( $id, 'bp-media-encoding-job-id', true );
|
852 |
+
$ffmpeg_thumbnail_ids = get_post_meta( $id, 'bp_media_thumbnail_ids', true );
|
853 |
+
$ffmpeg_thumbnail = get_post_meta( $id, 'bp_media_thumbnail', true );
|
854 |
+
$ffmpeg_remote_id = get_post_meta( $id, 'bp_media_ffmpeg_remote_id', true );
|
855 |
+
$kaltura_remote_id = get_post_meta( $id, 'bp_media_kaltura_remote_id', true );
|
856 |
+
|
857 |
+
if ( wp_mkdir_p( $basedir . "rtMedia/$prefix/" . $year_month ) ){
|
858 |
+
if ( copy( $attached_file, str_replace( $basedir, $basedir . "rtMedia/$prefix/", $attached_file ) ) ){
|
859 |
+
$delete = true;
|
860 |
+
|
861 |
+
if ( isset( $metadata['sizes'] ) ){
|
862 |
+
foreach ( $metadata['sizes'] as $size ) {
|
863 |
+
if ( ! copy( $file_folder_path . $size['file'], $new_file_folder_path . $size['file'] ) ){
|
864 |
+
$delete = false;
|
865 |
+
} else {
|
866 |
+
$delete_sizes[] = $file_folder_path . $size['file'];
|
867 |
+
$this->search_and_replace( trailingslashit( $baseurl . $year_month ) . $size['file'], trailingslashit( $baseurl . "rtMedia/$prefix/" . $year_month ) . $size['file'] );
|
868 |
+
}
|
869 |
+
}
|
870 |
+
}
|
871 |
+
if ( $backup_metadata ){
|
872 |
+
foreach ( $backup_metadata as $backup_images ) {
|
873 |
+
if ( ! copy( $file_folder_path . $backup_images['file'], $new_file_folder_path . $backup_images['file'] ) ){
|
874 |
+
$delete = false;
|
875 |
+
} else {
|
876 |
+
$delete_sizes[] = $file_folder_path . $backup_images['file'];
|
877 |
+
$this->search_and_replace( trailingslashit( $baseurl . $year_month ) . $backup_images['file'], trailingslashit( $baseurl . "rtMedia/$prefix/" . $year_month ) . $backup_images['file'] );
|
878 |
+
}
|
879 |
+
}
|
880 |
+
}
|
881 |
+
|
882 |
+
if ( $instagram_thumbs ){
|
883 |
+
foreach ( $instagram_thumbs as $key => $insta_thumb ) {
|
884 |
+
try {
|
885 |
+
if ( ! copy( str_replace( $baseurl, $basedir, $insta_thumb ), str_replace( $baseurl, $basedir . "rtMedia/$prefix/", $insta_thumb ) ) ){
|
886 |
+
$delete = false;
|
887 |
+
} else {
|
888 |
+
$delete_sizes[] = str_replace( $baseurl, $basedir, $insta_thumb );
|
889 |
+
$instagram_thumbs_new[ $key ] = str_replace( $baseurl, $baseurl . "rtMedia/$prefix/", $insta_thumb );
|
890 |
+
$this->search_and_replace( trailingslashit( $baseurl . $year_month ) . $insta_thumb, trailingslashit( $baseurl . "rtMedia/$prefix/" . $year_month ) . $insta_thumb );
|
891 |
+
}
|
892 |
+
} catch ( Exceptio $e ) {
|
893 |
+
$delete = false;
|
894 |
+
}
|
895 |
+
}
|
896 |
+
}
|
897 |
+
|
898 |
+
if ( $instagram_full_images ){
|
899 |
+
foreach ( $instagram_full_images as $key => $insta_full_image ) {
|
900 |
+
if ( ! copy( $insta_full_image, str_replace( $basedir, $basedir . "rtMedia/$prefix/", $insta_full_image ) ) ){
|
901 |
+
$delete = false;
|
902 |
+
} else {
|
903 |
+
$delete_sizes[] = $insta_full_image;
|
904 |
+
$instagram_full_images_new[ $key ] = str_replace( $basedir, $basedir . "rtMedia/$prefix", $insta_full_image );
|
905 |
+
$this->search_and_replace( trailingslashit( $baseurl . $year_month ) . $insta_full_image, trailingslashit( $baseurl . "rtMedia/$prefix/" . $year_month ) . $insta_full_image );
|
906 |
+
}
|
907 |
+
}
|
908 |
+
}
|
909 |
+
|
910 |
+
if ( $instagram_metadata ){
|
911 |
+
$instagram_metadata_new = $instagram_metadata;
|
912 |
+
foreach ( $instagram_metadata as $wp_size => $insta_metadata ) {
|
913 |
+
if ( isset( $insta_metadata['file'] ) ){
|
914 |
+
if ( ! copy( $basedir . $insta_metadata['file'], $basedir . "rtMedia/$prefix/" . $insta_metadata['file'] ) ){
|
915 |
+
$delete = false;
|
916 |
+
} else {
|
917 |
+
$delete_sizes[] = $basedir . $insta_metadata['file'];
|
918 |
+
$instagram_metadata_new[ $wp_size ]['file'] = "rtMedia/$prefix/" . $insta_metadata['file'];
|
919 |
+
if ( isset( $insta_metadata['sizes'] ) ){
|
920 |
+
foreach ( $insta_metadata['sizes'] as $key => $insta_size ) {
|
921 |
+
if ( ! copy( $file_folder_path . $insta_size['file'], $new_file_folder_path . $insta_size['file'] ) ){
|
922 |
+
$delete = false;
|
923 |
+
} else {
|
924 |
+
$delete_sizes[] = $file_folder_path . $insta_size['file'];
|
925 |
+
$this->search_and_replace( trailingslashit( $baseurl . $year_month ) . $insta_size['file'], trailingslashit( $baseurl . "rtMedia/$prefix/" . $year_month ) . $insta_size['file'] );
|
926 |
+
}
|
927 |
+
}
|
928 |
+
}
|
929 |
+
}
|
930 |
+
}
|
931 |
+
}
|
932 |
+
}
|
933 |
+
|
934 |
+
if ( $delete ){
|
935 |
+
if ( file_exists( $attached_file ) ){
|
936 |
+
unlink( $attached_file );
|
937 |
+
}
|
938 |
+
|
939 |
+
if ( isset( $delete_sizes ) ){
|
940 |
+
foreach ( $delete_sizes as $delete_size ) {
|
941 |
+
if ( file_exists( $delete_size ) ){
|
942 |
+
unlink( $delete_size );
|
943 |
+
}
|
944 |
+
}
|
945 |
+
}
|
946 |
+
update_post_meta( $id, '_wp_attached_file', "rtMedia/$prefix/" . $attached_file_option );
|
947 |
+
if ( isset( $metadata['file'] ) ){
|
948 |
+
$metadata['file'] = "rtMedia/$prefix/" . $metadata['file'];
|
949 |
+
wp_update_attachment_metadata( $id, $metadata );
|
950 |
+
}
|
951 |
+
if ( $instagram_thumbs ){
|
952 |
+
update_rtmedia_meta( $id, '_instagram_thumbs', $instagram_thumbs_new );
|
953 |
+
}
|
954 |
+
if ( $instagram_full_images ){
|
955 |
+
update_rtmedia_meta( $id, '_instagram_full_images', $instagram_full_images_new );
|
956 |
+
}
|
957 |
+
if ( $instagram_metadata ){
|
958 |
+
update_rtmedia_meta( $id, '_instagram_metadata', $instagram_metadata_new );
|
959 |
+
}
|
960 |
+
if ( $encoding_job_id ){
|
961 |
+
update_rtmedia_meta( $id, 'rtmedia-encoding-job-id', $encoding_job_id );
|
962 |
+
}
|
963 |
+
if ( $ffmpeg_thumbnail_ids ){
|
964 |
+
update_rtmedia_meta( $id, 'rtmedia-thumbnail-ids', $ffmpeg_thumbnail_ids );
|
965 |
+
}
|
966 |
+
if ( $ffmpeg_thumbnail ){
|
967 |
+
$model = new RTMediaModel();
|
968 |
+
$model->update( array( 'cover_art' => $ffmpeg_thumbnail ), array( 'id' => $id ) );
|
969 |
+
}
|
970 |
+
if ( $ffmpeg_remote_id ){
|
971 |
+
update_rtmedia_meta( $id, 'rtmedia-ffmpeg-remote-id', $ffmpeg_remote_id );
|
972 |
+
}
|
973 |
+
if ( $kaltura_remote_id ){
|
974 |
+
update_rtmedia_meta( $id, 'rtmedia-kaltura-remote-id', $kaltura_remote_id );
|
975 |
+
}
|
976 |
+
|
977 |
+
$attachment = array();
|
978 |
+
$attachment['ID'] = $id;
|
979 |
+
$old_guid = get_post_field( 'guid', $id );
|
980 |
+
$attachment['guid'] = str_replace( $baseurl, $baseurl . "rtMedia/$prefix/", $old_guid );
|
981 |
+
/**
|
982 |
+
* For Activity
|
983 |
+
*/
|
984 |
+
global $last_baseurl, $last_newurl;
|
985 |
+
$last_baseurl = $baseurl;
|
986 |
+
$last_newurl = $baseurl . "rtMedia/$prefix/";
|
987 |
+
$this->search_and_replace( $old_guid, $attachment['guid'] );
|
988 |
+
wp_update_post( $attachment );
|
989 |
+
}
|
990 |
+
}
|
991 |
+
}
|
992 |
+
}
|
993 |
+
|
994 |
+
function search_and_replace( $old, $new ){
|
995 |
+
global $wpdb;
|
996 |
+
if ( function_exists( 'bp_core_get_table_prefix' ) ){
|
997 |
+
$bp_prefix = bp_core_get_table_prefix();
|
998 |
+
} else {
|
999 |
+
$bp_prefix = $wpdb->prefix;
|
1000 |
+
}
|
1001 |
+
$sql = $wpdb->prepare( "update {$bp_prefix}bp_activity set action=replace(action,%s,%s) ,content=replace(content,%s,%s), primary_link=replace(primary_link,%s,%s) where id > 0;", $old, $new, $old, $new, $old, $new );
|
1002 |
+
$wpdb->get_row( $sql );
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
function formatSeconds( $secondsLeft ){
|
1006 |
+
|
1007 |
+
$minuteInSeconds = 60;
|
1008 |
+
$hourInSeconds = $minuteInSeconds * 60;
|
1009 |
+
$dayInSeconds = $hourInSeconds * 24;
|
1010 |
+
|
1011 |
+
$days = floor( $secondsLeft / $dayInSeconds );
|
1012 |
+
$secondsLeft = $secondsLeft % $dayInSeconds;
|
1013 |
+
|
1014 |
+
$hours = floor( $secondsLeft / $hourInSeconds );
|
1015 |
+
$secondsLeft = $secondsLeft % $hourInSeconds;
|
1016 |
+
|
1017 |
+
$minutes = floor( $secondsLeft / $minuteInSeconds );
|
1018 |
+
|
1019 |
+
$seconds = $secondsLeft % $minuteInSeconds;
|
1020 |
+
|
1021 |
+
$timeComponents = array();
|
1022 |
+
|
1023 |
+
if ( $days > 0 ){
|
1024 |
+
$timeComponents[] = $days . __( ' day', 'rtmedia' ) . ( $days > 1 ? 's' : '' );
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
if ( $hours > 0 ){
|
1028 |
+
$timeComponents[] = $hours . __( ' hour', 'rtmedia' ) . ( $hours > 1 ? 's' : '' );
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
if ( $minutes > 0 ){
|
1032 |
+
$timeComponents[] = $minutes . __( ' minute', 'rtmedia' ) . ( $minutes > 1 ? 's' : '' );
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
if ( $seconds > 0 ){
|
1036 |
+
$timeComponents[] = $seconds . __( ' second', 'rtmedia' ) . ( $seconds > 1 ? 's' : '' );
|
1037 |
+
}
|
1038 |
+
if ( count( $timeComponents ) > 0 ){
|
1039 |
+
$formattedTimeRemaining = implode( ', ', $timeComponents );
|
1040 |
+
$formattedTimeRemaining = trim( $formattedTimeRemaining );
|
1041 |
+
} else {
|
1042 |
+
$formattedTimeRemaining = __( 'No time remaining.', 'rtmedia' );
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
return $formattedTimeRemaining;
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
function insert_comment( $media_id, $data, $exclude, $parent_commnet_id = 0 ){
|
1049 |
+
foreach ( $data as $cmnt ) {
|
1050 |
+
$comment_id = 0;
|
1051 |
+
if ( ! key_exists( strval( $cmnt->id ), $exclude ) ){
|
1052 |
+
$commentdata = array(
|
1053 |
+
'comment_date' => $cmnt->date_recorded,
|
1054 |
+
'comment_parent' => $parent_commnet_id,
|
1055 |
+
'user_id' => $cmnt->user_id,
|
1056 |
+
'comment_content' => $cmnt->content,
|
1057 |
+
'comment_author_email' => $cmnt->user_email,
|
1058 |
+
'comment_post_ID' => $media_id,
|
1059 |
+
'comment_author' => $cmnt->display_name,
|
1060 |
+
'comment_author_url' => '',
|
1061 |
+
'comment_author_IP' => '',
|
1062 |
+
);
|
1063 |
+
$comment_id = wp_insert_comment( $commentdata );
|
1064 |
+
$exclude[ strval( $cmnt->id ) ] = $comment_id;
|
1065 |
+
} else {
|
1066 |
+
$comment_id = $exclude[ strval( $cmnt->id ) ];
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
update_post_meta( $media_id, 'rtmedia_imported_activity', $exclude );
|
1070 |
+
|
1071 |
+
if ( is_array( $cmnt->children ) ){
|
1072 |
+
$this->insert_comment( $media_id, $cmnt->children, $exclude, $comment_id );
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
|
1077 |
}
|
app/main/RTMedia.php
CHANGED
@@ -83,7 +83,7 @@ class RTMedia
|
|
83 |
* @global int $bp_media_counter Media counter
|
84 |
*/
|
85 |
public function __construct() {
|
86 |
-
$this->default_thumbnail = apply_filters('rtmedia_default_thumbnail', RTMEDIA_URL . 'assets/thumb_default.png');
|
87 |
add_action('init', array($this, 'check_global_album'));
|
88 |
add_action('plugins_loaded', array($this, 'init'), 20);
|
89 |
add_action('plugins_loaded', array($this, 'load_translation'), 10);
|
@@ -94,8 +94,9 @@ class RTMedia
|
|
94 |
add_filter('intermediate_image_sizes_advanced', array($this, 'filter_image_sizes_details'));
|
95 |
add_filter('intermediate_image_sizes', array($this, 'filter_image_sizes'));
|
96 |
add_filter("site_option_upload_filetypes",array(&$this, "filter_allow_mime_type_mu"),1,1);
|
97 |
-
|
98 |
}
|
|
|
99 |
function filter_allow_mime_type_mu($options){
|
100 |
$allowed_types = array();
|
101 |
$this->allowed_types = apply_filters ( 'rtmedia_allowed_types', $this->allowed_types );
|
@@ -116,6 +117,7 @@ class RTMedia
|
|
116 |
}
|
117 |
return $options ;
|
118 |
}
|
|
|
119 |
function fix_parent_id() {
|
120 |
$site_global = rtmedia_get_site_option('rtmedia-global-albums');
|
121 |
if ($site_global && is_array($site_global) && isset($site_global[0])) {
|
@@ -906,11 +908,19 @@ class RTMedia
|
|
906 |
wp_localize_script ( 'rtmedia-main', 'rtmedia_masonry_layout', 'false' );
|
907 |
}
|
908 |
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
}
|
915 |
|
916 |
function set_bp_bar() {
|
83 |
* @global int $bp_media_counter Media counter
|
84 |
*/
|
85 |
public function __construct() {
|
86 |
+
$this->default_thumbnail = apply_filters('rtmedia_default_thumbnail', RTMEDIA_URL . 'app/assets/img/thumb_default.png');
|
87 |
add_action('init', array($this, 'check_global_album'));
|
88 |
add_action('plugins_loaded', array($this, 'init'), 20);
|
89 |
add_action('plugins_loaded', array($this, 'load_translation'), 10);
|
94 |
add_filter('intermediate_image_sizes_advanced', array($this, 'filter_image_sizes_details'));
|
95 |
add_filter('intermediate_image_sizes', array($this, 'filter_image_sizes'));
|
96 |
add_filter("site_option_upload_filetypes",array(&$this, "filter_allow_mime_type_mu"),1,1);
|
97 |
+
add_filter( 'image_size_names_choose', array($this,'rtmedia_custom_image_sizes_choose' ));
|
98 |
}
|
99 |
+
|
100 |
function filter_allow_mime_type_mu($options){
|
101 |
$allowed_types = array();
|
102 |
$this->allowed_types = apply_filters ( 'rtmedia_allowed_types', $this->allowed_types );
|
117 |
}
|
118 |
return $options ;
|
119 |
}
|
120 |
+
|
121 |
function fix_parent_id() {
|
122 |
$site_global = rtmedia_get_site_option('rtmedia-global-albums');
|
123 |
if ($site_global && is_array($site_global) && isset($site_global[0])) {
|
908 |
wp_localize_script ( 'rtmedia-main', 'rtmedia_masonry_layout', 'false' );
|
909 |
}
|
910 |
|
911 |
+
if( isset( $rtmedia->options['general_display_media'] ) ) {
|
912 |
+
wp_localize_script( 'rtmedia-backbone', 'rtmedia_load_more_or_pagination', $rtmedia->options['general_display_media'] );
|
913 |
+
} else {
|
914 |
+
wp_localize_script( 'rtmedia-backbone', 'rtmedia_load_more_or_pagination', 'load_more' );
|
915 |
+
}
|
916 |
+
|
917 |
+
if( isset( $rtmedia->options['buddypress_enableOnActivity'] ) ) {
|
918 |
+
wp_localize_script( 'rtmedia-backbone', 'rtmedia_bp_enable_activity', $rtmedia->options['buddypress_enableOnActivity'] );
|
919 |
+
} else {
|
920 |
+
wp_localize_script( 'rtmedia-backbone', 'rtmedia_bp_enable_activity', '0' );
|
921 |
+
}
|
922 |
+
|
923 |
+
wp_localize_script( 'rtmedia-backbone', 'rtmedia_upload_progress_error_message', __( "There are some uploads in progress. Do you want to cancel them?", 'rtmedia' ) );
|
924 |
}
|
925 |
|
926 |
function set_bp_bar() {
|
app/main/contexts/RTMediaContext.php
CHANGED
@@ -16,98 +16,105 @@
|
|
16 |
*/
|
17 |
class RTMediaContext {
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
return $this;
|
35 |
-
}
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
*/
|
40 |
-
function set_context () {
|
41 |
-
if ( class_exists ( 'BuddyPress' ) ) {
|
42 |
-
$this->set_bp_context ();
|
43 |
-
} else {
|
44 |
-
$this->set_wp_context ();
|
45 |
-
}
|
46 |
-
}
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
} elseif ( isset ( $post->post_type ) ) {
|
59 |
-
$this->type = $post->post_type;
|
60 |
-
$this->id = $post->ID;
|
61 |
-
} else {
|
62 |
-
$this->type = 'profile';
|
63 |
-
$this->id = get_current_user_id ();
|
64 |
-
}
|
65 |
-
$this->type = apply_filters('rtmedia_wp_context_type',$this->type);
|
66 |
-
$this->id = apply_filters('rtmedia_wp_context_id',$this->id);
|
67 |
-
}
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
$this->id = $this->get_current_bp_component_id ();
|
91 |
-
if ( $this->id == null ) {
|
92 |
-
global $bp;
|
93 |
-
$this->id = $bp->loggedin_user->id;
|
94 |
-
}
|
95 |
-
}
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
}
|
16 |
*/
|
17 |
class RTMediaContext {
|
18 |
|
19 |
+
/**
|
20 |
+
*
|
21 |
+
* @var type
|
22 |
+
*
|
23 |
+
* $type - Context Type. It can be any type among these. (post, page, custom_post, home_page, archive etc.)
|
24 |
+
* $id - context id of the context
|
25 |
+
*/
|
26 |
+
public $type, $id;
|
27 |
|
28 |
+
/**
|
29 |
+
*
|
30 |
+
* @return \RTMediaContext
|
31 |
+
*/
|
32 |
+
function __construct(){
|
33 |
+
$this->set_context();
|
|
|
|
|
34 |
|
35 |
+
return $this;
|
36 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
/**
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
function set_context(){
|
42 |
+
if ( class_exists( 'BuddyPress' ) ){
|
43 |
+
$this->set_bp_context();
|
44 |
+
} else {
|
45 |
+
$this->set_wp_context();
|
46 |
+
}
|
47 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
/**
|
50 |
+
*
|
51 |
+
* @global type $post
|
52 |
+
*/
|
53 |
+
function set_wp_context(){
|
54 |
+
global $post;
|
55 |
+
global $bp;
|
56 |
+
if ( is_author() ){
|
57 |
+
$this->type = 'profile';
|
58 |
+
$this->id = get_query_var( 'author' );
|
59 |
+
} elseif ( isset( $post->post_type ) ) {
|
60 |
+
$this->type = $post->post_type;
|
61 |
+
$this->id = $post->ID;
|
62 |
+
} else {
|
63 |
+
$this->type = 'profile';
|
64 |
+
$this->id = get_current_user_id();
|
65 |
+
}
|
66 |
+
$this->type = apply_filters( 'rtmedia_wp_context_type', $this->type );
|
67 |
+
$this->id = apply_filters( 'rtmedia_wp_context_id', $this->id );
|
68 |
+
}
|
69 |
|
70 |
+
/**
|
71 |
+
*
|
72 |
+
*/
|
73 |
+
function set_bp_context(){
|
74 |
+
if ( bp_is_blog_page() && ! is_home() ){
|
75 |
+
$this->set_wp_context();
|
76 |
+
} else {
|
77 |
+
$this->set_bp_component_context();
|
78 |
+
}
|
79 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
/**
|
82 |
+
*
|
83 |
+
*/
|
84 |
+
function set_bp_component_context(){
|
85 |
+
if ( bp_displayed_user_id() && ! bp_is_group() ){
|
86 |
+
$this->type = 'profile';
|
87 |
+
} else {
|
88 |
+
if ( ! bp_displayed_user_id() && bp_is_group() ){
|
89 |
+
$this->type = 'group';
|
90 |
+
} else {
|
91 |
+
$this->type = 'profile';
|
92 |
+
}
|
93 |
+
}
|
94 |
+
$this->id = $this->get_current_bp_component_id();
|
95 |
+
if ( $this->id == null ){
|
96 |
+
global $bp;
|
97 |
+
$this->id = $bp->loggedin_user->id;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
*
|
103 |
+
* @return type
|
104 |
+
*/
|
105 |
+
function get_current_bp_component_id(){
|
106 |
+
switch ( bp_current_component() ) {
|
107 |
+
case 'groups':
|
108 |
+
if ( function_exists( 'bp_get_current_group_id' ) ){
|
109 |
+
return bp_get_current_group_id();
|
110 |
+
}
|
111 |
+
|
112 |
+
return null;
|
113 |
+
break;
|
114 |
+
default:
|
115 |
+
return bp_displayed_user_id();
|
116 |
+
break;
|
117 |
+
}
|
118 |
+
}
|
119 |
|
120 |
}
|
app/main/controllers/activity/RTMediaActivity.php
CHANGED
@@ -19,11 +19,11 @@ class RTMediaActivity {
|
|
19 |
/**
|
20 |
*
|
21 |
*/
|
22 |
-
function __construct( $media, $privacy = 0, $activity_text = false )
|
23 |
-
if ( !isset
|
24 |
return false;
|
25 |
}
|
26 |
-
if ( !is_array( $media ) )
|
27 |
$media = array( $media );
|
28 |
}
|
29 |
|
@@ -32,22 +32,21 @@ class RTMediaActivity {
|
|
32 |
$this->privacy = $privacy;
|
33 |
}
|
34 |
|
35 |
-
function create_activity_html()
|
36 |
-
|
37 |
|
38 |
$html = '';
|
39 |
|
40 |
$html .= '<div class="rtmedia-activity-container">';
|
41 |
|
42 |
-
if ( !empty
|
43 |
$html .= '<div class="rtmedia-activity-text">';
|
44 |
$html .= $this->activity_text;
|
45 |
$html .= '</div>';
|
46 |
}
|
47 |
|
48 |
global $rtmedia;
|
49 |
-
if ( isset( $rtmedia->options[
|
50 |
-
$limitActivityFeed = $rtmedia->options[
|
51 |
} else {
|
52 |
$limitActivityFeed = 0;
|
53 |
}
|
@@ -55,15 +54,15 @@ class RTMediaActivity {
|
|
55 |
$mediaObj = new RTMediaModel();
|
56 |
$media_details = $mediaObj->get( array( 'id' => $this->media ) );
|
57 |
|
58 |
-
if ( intval( $limitActivityFeed ) > 0 )
|
59 |
$media_details = array_slice( $media_details, 0, $limitActivityFeed, true );
|
60 |
}
|
61 |
-
$rtmedia_activity_ul_class = apply_filters(
|
62 |
-
$li_content =
|
63 |
$count = 0;
|
64 |
foreach ( $media_details as $media ) {
|
65 |
$li_content .= '<li class="rtmedia-list-item media-type-' . $media->media_type . '">';
|
66 |
-
if ( $media->media_type
|
67 |
$li_content .= '<a href ="' . get_rtmedia_permalink( $media->id ) . '">';
|
68 |
}
|
69 |
$li_content .= '<div class="rtmedia-item-thumbnail">';
|
@@ -74,17 +73,17 @@ class RTMediaActivity {
|
|
74 |
|
75 |
$li_content .= '<div class="rtmedia-item-title">';
|
76 |
$li_content .= '<h4 title="' . $media->media_title . '">';
|
77 |
-
if ( $media->media_type
|
78 |
$li_content .= '<a href="' . get_rtmedia_permalink( $media->id ) . '">';
|
79 |
}
|
80 |
|
81 |
$li_content .= $media->media_title;
|
82 |
-
if ( $media->media_type
|
83 |
$li_content .= '</a>';
|
84 |
}
|
85 |
$li_content .= '</h4>';
|
86 |
$li_content .= '</div>';
|
87 |
-
if ( $media->media_type
|
88 |
$li_content .= '</a>';
|
89 |
}
|
90 |
|
@@ -101,15 +100,16 @@ class RTMediaActivity {
|
|
101 |
|
102 |
return bp_activity_filter_kses( $html );
|
103 |
}
|
|
|
104 |
/**
|
105 |
* @fixme me Why this function is required ?
|
106 |
*/
|
107 |
-
function actions()
|
108 |
|
109 |
}
|
110 |
|
111 |
-
function media( $media )
|
112 |
-
if ( isset
|
113 |
// if ($media->media_type == 'album' ||
|
114 |
// $media->media_type != 'photo') {
|
115 |
// $thumbnail_id = get_rtmedia_meta($media->media_id,'cover_art');
|
@@ -119,22 +119,22 @@ class RTMediaActivity {
|
|
119 |
// }
|
120 |
// }
|
121 |
global $rtmedia;
|
122 |
-
if ( $media->media_type
|
123 |
$thumbnail_id = $media->media_id;
|
124 |
-
if ( $thumbnail_id )
|
125 |
-
list( $src, $width, $height ) = wp_get_attachment_image_src( $thumbnail_id,
|
126 |
$html = '<img src="' . $src . '" />';
|
127 |
}
|
128 |
-
} elseif ( $media->media_type
|
129 |
$cover_art = rtmedia_get_cover_art_src( $media->id );
|
130 |
-
if ( $cover_art )
|
131 |
$poster = 'poster = "' . $cover_art . '"';
|
132 |
} else {
|
133 |
-
$poster =
|
134 |
}
|
135 |
-
$html = '<video ' . $poster . ' src="' . wp_get_attachment_url( $media->media_id ) . '" width="' . $rtmedia->options[
|
136 |
-
} elseif ( $media->media_type
|
137 |
-
$html = '<audio src="' . wp_get_attachment_url( $media->media_id ) . '" width="' . $rtmedia->options[
|
138 |
} else {
|
139 |
$html = false;
|
140 |
}
|
19 |
/**
|
20 |
*
|
21 |
*/
|
22 |
+
function __construct( $media, $privacy = 0, $activity_text = false ){
|
23 |
+
if ( ! isset( $media ) ){
|
24 |
return false;
|
25 |
}
|
26 |
+
if ( ! is_array( $media ) ){
|
27 |
$media = array( $media );
|
28 |
}
|
29 |
|
32 |
$this->privacy = $privacy;
|
33 |
}
|
34 |
|
35 |
+
function create_activity_html(){
|
|
|
36 |
|
37 |
$html = '';
|
38 |
|
39 |
$html .= '<div class="rtmedia-activity-container">';
|
40 |
|
41 |
+
if ( ! empty( $this->activity_text ) ){
|
42 |
$html .= '<div class="rtmedia-activity-text">';
|
43 |
$html .= $this->activity_text;
|
44 |
$html .= '</div>';
|
45 |
}
|
46 |
|
47 |
global $rtmedia;
|
48 |
+
if ( isset( $rtmedia->options['buddypress_limitOnActivity'] ) ){
|
49 |
+
$limitActivityFeed = $rtmedia->options['buddypress_limitOnActivity'];
|
50 |
} else {
|
51 |
$limitActivityFeed = 0;
|
52 |
}
|
54 |
$mediaObj = new RTMediaModel();
|
55 |
$media_details = $mediaObj->get( array( 'id' => $this->media ) );
|
56 |
|
57 |
+
if ( intval( $limitActivityFeed ) > 0 ){
|
58 |
$media_details = array_slice( $media_details, 0, $limitActivityFeed, true );
|
59 |
}
|
60 |
+
$rtmedia_activity_ul_class = apply_filters( 'rtmedia_activity_ul_class', 'large-block-grid-3' );
|
61 |
+
$li_content = '';
|
62 |
$count = 0;
|
63 |
foreach ( $media_details as $media ) {
|
64 |
$li_content .= '<li class="rtmedia-list-item media-type-' . $media->media_type . '">';
|
65 |
+
if ( 'photo' == $media->media_type ){
|
66 |
$li_content .= '<a href ="' . get_rtmedia_permalink( $media->id ) . '">';
|
67 |
}
|
68 |
$li_content .= '<div class="rtmedia-item-thumbnail">';
|
73 |
|
74 |
$li_content .= '<div class="rtmedia-item-title">';
|
75 |
$li_content .= '<h4 title="' . $media->media_title . '">';
|
76 |
+
if ( 'photo' != $media->media_type ){
|
77 |
$li_content .= '<a href="' . get_rtmedia_permalink( $media->id ) . '">';
|
78 |
}
|
79 |
|
80 |
$li_content .= $media->media_title;
|
81 |
+
if ( 'photo' != $media->media_type ){
|
82 |
$li_content .= '</a>';
|
83 |
}
|
84 |
$li_content .= '</h4>';
|
85 |
$li_content .= '</div>';
|
86 |
+
if ( 'photo' == $media->media_type ){
|
87 |
$li_content .= '</a>';
|
88 |
}
|
89 |
|
100 |
|
101 |
return bp_activity_filter_kses( $html );
|
102 |
}
|
103 |
+
|
104 |
/**
|
105 |
* @fixme me Why this function is required ?
|
106 |
*/
|
107 |
+
function actions(){
|
108 |
|
109 |
}
|
110 |
|
111 |
+
function media( $media ){
|
112 |
+
if ( isset( $media->media_type ) ){
|
113 |
// if ($media->media_type == 'album' ||
|
114 |
// $media->media_type != 'photo') {
|
115 |
// $thumbnail_id = get_rtmedia_meta($media->media_id,'cover_art');
|
119 |
// }
|
120 |
// }
|
121 |
global $rtmedia;
|
122 |
+
if ( 'photo' == $media->media_type ){
|
123 |
$thumbnail_id = $media->media_id;
|
124 |
+
if ( $thumbnail_id ){
|
125 |
+
list( $src, $width, $height ) = wp_get_attachment_image_src( $thumbnail_id, 'rt_media_activity_image' );
|
126 |
$html = '<img src="' . $src . '" />';
|
127 |
}
|
128 |
+
} elseif ( 'video' == $media->media_type ) {
|
129 |
$cover_art = rtmedia_get_cover_art_src( $media->id );
|
130 |
+
if ( $cover_art ){
|
131 |
$poster = 'poster = "' . $cover_art . '"';
|
132 |
} else {
|
133 |
+
$poster = '';
|
134 |
}
|
135 |
+
$html = '<video ' . $poster . ' src="' . wp_get_attachment_url( $media->media_id ) . '" width="' . $rtmedia->options['defaultSizes_video_activityPlayer_width'] . '" height="' . $rtmedia->options['defaultSizes_video_activityPlayer_height'] . '" type="video/mp4" class="wp-video-shortcode" id="rt_media_video_' . $media->id . '" controls="controls" preload="none"></video>';
|
136 |
+
} elseif ( 'music' == $media->media_type ) {
|
137 |
+
$html = '<audio src="' . wp_get_attachment_url( $media->media_id ) . '" width="' . $rtmedia->options['defaultSizes_music_activityPlayer_width'] . '" height="0" type="audio/mp3" class="wp-audio-shortcode" id="rt_media_audio_' . $media->id . '" controls="controls" preload="none"></audio>';
|
138 |
} else {
|
139 |
$html = false;
|
140 |
}
|
app/main/controllers/activity/RTMediaBuddyPressActivity.php
CHANGED
@@ -12,222 +12,219 @@
|
|
12 |
*/
|
13 |
class RTMediaBuddyPressActivity {
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
function bp_activity_deleted_activities ( $activity_ids_deleted ) {
|
31 |
-
//$activity_ids_deleted
|
32 |
-
$rt_model = new RTMediaModel();
|
33 |
-
$all_media = $rt_model->get ( array( "activity_id" => $activity_ids_deleted ) );
|
34 |
-
if ( $all_media ) {
|
35 |
-
$media = new RTMediaMedia();
|
36 |
-
remove_action ( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
|
37 |
-
foreach ( $all_media as $single_media ) {
|
38 |
-
$media->delete ( $single_media->id, false, false );
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
function bp_get_activity_parent_content ( $content ) {
|
44 |
-
global $activities_template;
|
45 |
-
|
46 |
-
// Get the ID of the parent activity content
|
47 |
-
if ( ! $parent_id = $activities_template->activity->item_id )
|
48 |
-
return false;
|
49 |
-
|
50 |
-
// Bail if no parent content
|
51 |
-
if ( empty ( $activities_template->activity_parents[ $parent_id ] ) )
|
52 |
-
return false;
|
53 |
-
|
54 |
-
// Bail if no action
|
55 |
-
if ( empty ( $activities_template->activity_parents[ $parent_id ]->action ) )
|
56 |
-
return false;
|
57 |
-
|
58 |
-
// Content always includes action
|
59 |
-
$content = $activities_template->activity_parents[ $parent_id ]->action;
|
60 |
-
|
61 |
-
// Maybe append activity content, if it exists
|
62 |
-
if ( ! empty ( $activities_template->activity_parents[ $parent_id ]->content ) )
|
63 |
-
$content .= ' ' . $activities_template->activity_parents[ $parent_id ]->content;
|
64 |
-
|
65 |
-
// Remove the time since content for backwards compatibility
|
66 |
-
$content = str_replace ( '<span class="time-since">%s</span>', '', $content );
|
67 |
-
return $content;
|
68 |
-
}
|
69 |
-
function delete_comment_sync($activity_id, $comment_id){
|
70 |
-
global $wpdb;
|
71 |
-
$comment_id = $wpdb->get_var($wpdb->prepare("select comment_id from {$wpdb->commentmeta} where meta_key = 'activity_id' and meta_value=%s",$comment_id));
|
72 |
-
if($comment_id){
|
73 |
-
wp_delete_comment($comment_id , true);
|
74 |
-
}
|
75 |
-
}
|
76 |
-
function comment_sync ( $comment_id, $param ) {
|
77 |
-
|
78 |
-
$user_id = '';
|
79 |
-
$comment_author = '';
|
80 |
-
extract($param);
|
81 |
-
if( !empty($user_id) ){
|
82 |
-
$user_data = get_userdata($user_id);
|
83 |
-
$comment_author = $user_data->data->user_login;
|
84 |
}
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
-
}
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
109 |
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
// hook for rtmedia buddypress after activity posted
|
130 |
do_action( 'rtmedia_bp_activity_posted', $updated_content, $user_id, $activity_id );
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
// insert/update activity details in rtmedia activity table
|
143 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
144 |
-
if( ! $rtmedia_activity_model->check( $activity_id ) ){
|
145 |
$rtmedia_activity_model->insert( array( 'activity_id' => $activity_id, 'user_id' => $user_id, 'privacy' => $privacy ) );
|
146 |
} else {
|
147 |
$rtmedia_activity_model->update( array( 'activity_id' => $activity_id, 'user_id' => $user_id, 'privacy' => $privacy ), array( 'activity_id' => $activity_id ) );
|
148 |
}
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
$activity_allowedtags[ 'ul' ] = array( );
|
222 |
-
$activity_allowedtags[ 'ul' ][ 'class' ] = array( );
|
223 |
-
$activity_allowedtags[ 'li' ] = array( );
|
224 |
-
$activity_allowedtags[ 'li' ][ 'class' ] = array( );
|
225 |
-
|
226 |
-
/* Legacy Code */
|
227 |
-
//$activity_allowedtags[ 'script' ] = array( );
|
228 |
-
//$activity_allowedtags[ 'script' ][ 'type' ] = array( );
|
229 |
-
|
230 |
-
return $activity_allowedtags;
|
231 |
-
}
|
232 |
|
233 |
}
|
12 |
*/
|
13 |
class RTMediaBuddyPressActivity {
|
14 |
|
15 |
+
function __construct(){
|
16 |
+
global $rtmedia;
|
17 |
+
if ( 0 != $rtmedia->options['buddypress_enableOnActivity'] ){
|
18 |
+
add_action( 'bp_after_activity_post_form', array( &$this, 'bp_after_activity_post_form' ) );
|
19 |
+
add_action( 'bp_activity_posted_update', array( &$this, 'bp_activity_posted_update' ), 99, 3 );
|
20 |
+
add_action( 'bp_groups_posted_update', array( &$this, 'bp_groups_posted_update' ), 99, 4 );
|
21 |
+
}
|
22 |
+
add_action( 'bp_init', array( $this, 'non_threaded_comments' ) );
|
23 |
+
add_action( 'bp_activity_comment_posted', array( $this, 'comment_sync' ), 10, 2 );
|
24 |
+
add_action( 'bp_activity_delete_comment', array( $this, 'delete_comment_sync' ), 10, 2 );
|
25 |
+
add_filter( 'bp_activity_allowed_tags', array( &$this, 'override_allowed_tags' ) );
|
26 |
+
add_filter( 'bp_get_activity_parent_content', array( &$this, 'bp_get_activity_parent_content' ) );
|
27 |
+
add_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
+
|
30 |
+
function bp_activity_deleted_activities( $activity_ids_deleted ){
|
31 |
+
//$activity_ids_deleted
|
32 |
+
$rt_model = new RTMediaModel();
|
33 |
+
$all_media = $rt_model->get( array( 'activity_id' => $activity_ids_deleted ) );
|
34 |
+
if ( $all_media ){
|
35 |
+
$media = new RTMediaMedia();
|
36 |
+
remove_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
|
37 |
+
foreach ( $all_media as $single_media ) {
|
38 |
+
$media->delete( $single_media->id, false, false );
|
39 |
+
}
|
40 |
+
}
|
41 |
}
|
|
|
42 |
|
43 |
+
function bp_get_activity_parent_content( $content ){
|
44 |
+
global $activities_template;
|
45 |
+
|
46 |
+
// Get the ID of the parent activity content
|
47 |
+
if ( ! $parent_id = $activities_template->activity->item_id ){
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
// Bail if no parent content
|
52 |
+
if ( empty( $activities_template->activity_parents[ $parent_id ] ) ){
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
|
56 |
+
// Bail if no action
|
57 |
+
if ( empty( $activities_template->activity_parents[ $parent_id ]->action ) ){
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
// Content always includes action
|
62 |
+
$content = $activities_template->activity_parents[ $parent_id ]->action;
|
63 |
+
|
64 |
+
// Maybe append activity content, if it exists
|
65 |
+
if ( ! empty( $activities_template->activity_parents[ $parent_id ]->content ) ){
|
66 |
+
$content .= ' ' . $activities_template->activity_parents[ $parent_id ]->content;
|
67 |
+
}
|
68 |
|
69 |
+
// Remove the time since content for backwards compatibility
|
70 |
+
$content = str_replace( '<span class="time-since">%s</span>', '', $content );
|
71 |
+
|
72 |
+
return $content;
|
73 |
+
}
|
74 |
+
|
75 |
+
function delete_comment_sync( $activity_id, $comment_id ){
|
76 |
+
global $wpdb;
|
77 |
+
$comment_id = $wpdb->get_var( $wpdb->prepare( "select comment_id from {$wpdb->commentmeta} where meta_key = 'activity_id' and meta_value=%s", $comment_id ) );
|
78 |
+
if ( $comment_id ){
|
79 |
+
wp_delete_comment( $comment_id, true );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
function comment_sync( $comment_id, $param ){
|
84 |
+
|
85 |
+
$user_id = '';
|
86 |
+
$comment_author = '';
|
87 |
+
extract( $param );
|
88 |
+
if ( ! empty( $user_id ) ){
|
89 |
+
$user_data = get_userdata( $user_id );
|
90 |
+
$comment_author = $user_data->data->user_login;
|
91 |
+
}
|
92 |
+
$mediamodel = new RTMediaModel();
|
93 |
+
$media = $mediamodel->get( array( 'activity_id' => $param['activity_id'] ) );
|
94 |
+
// if there is only single media in activity
|
95 |
+
if ( 1 == sizeof( $media ) && isset( $media[0]->media_id ) ){
|
96 |
+
$media_id = $media[0]->media_id;
|
97 |
+
$comment = new RTMediaComment();
|
98 |
+
$id = $comment->add( array( 'comment_content' => $param['content'], 'comment_post_ID' => $media_id, 'user_id' => $user_id, 'comment_author' => $comment_author ) );
|
99 |
+
update_comment_meta( $id, 'activity_id', $comment_id );
|
100 |
+
}
|
101 |
+
}
|
102 |
|
103 |
+
function non_threaded_comments(){
|
104 |
+
if ( isset( $_POST['action'] ) && 'new_activity_comment' == $_POST['action'] ){
|
105 |
+
$activity_id = $_POST['form_id'];
|
106 |
+
$act = new BP_Activity_Activity( $activity_id );
|
107 |
|
108 |
+
if ( 'rtmedia_update' == $act->type ){
|
109 |
+
$_POST['comment_id'] = $_POST['form_id'];
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
function bp_groups_posted_update( $content, $user_id, $group_id, $activity_id ){
|
115 |
+
$this->bp_activity_posted_update( $content, $user_id, $activity_id );
|
116 |
+
}
|
117 |
+
|
118 |
+
function bp_activity_posted_update( $content, $user_id, $activity_id ){
|
119 |
global $wpdb, $bp;
|
120 |
+
$updated_content = '';
|
121 |
|
122 |
// hook for rtmedia buddypress before activity posted
|
123 |
do_action( 'rtmedia_bp_before_activity_posted', $content, $user_id, $activity_id );
|
124 |
|
125 |
+
if ( isset( $_POST['rtMedia_attached_files'] ) && is_array( $_POST['rtMedia_attached_files'] ) ){
|
126 |
+
$updated_content = $wpdb->get_var( "select content from {$bp->activity->table_name} where id= $activity_id" );
|
127 |
+
|
128 |
+
$objActivity = new RTMediaActivity( $_POST['rtMedia_attached_files'], 0, $updated_content );
|
129 |
+
$html_content = $objActivity->create_activity_html();
|
130 |
+
bp_activity_update_meta( $activity_id, 'bp_old_activity_content', $html_content );
|
131 |
+
bp_activity_update_meta( $activity_id, 'bp_activity_text', $updated_content );
|
132 |
+
$wpdb->update( $bp->activity->table_name, array( 'type' => 'rtmedia_update', 'content' => $html_content ), array( 'id' => $activity_id ) );
|
133 |
+
$mediaObj = new RTMediaModel();
|
134 |
+
$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'] ) . ')';
|
135 |
+
$wpdb->query( $sql );
|
136 |
+
}
|
137 |
// hook for rtmedia buddypress after activity posted
|
138 |
do_action( 'rtmedia_bp_activity_posted', $updated_content, $user_id, $activity_id );
|
139 |
|
140 |
+
if ( isset( $_POST['rtmedia-privacy'] ) ){
|
141 |
+
$privacy = - 1;
|
142 |
+
if ( is_rtmedia_privacy_enable() ){
|
143 |
+
if ( is_rtmedia_privacy_user_overide() ){
|
144 |
+
$privacy = $_POST['rtmedia-privacy'];
|
145 |
+
} else {
|
146 |
+
$privacy = get_rtmedia_default_privacy();
|
147 |
+
}
|
148 |
+
}
|
149 |
+
bp_activity_update_meta( $activity_id, 'rtmedia_privacy', $privacy );
|
150 |
// insert/update activity details in rtmedia activity table
|
151 |
$rtmedia_activity_model = new RTMediaActivityModel();
|
152 |
+
if ( ! $rtmedia_activity_model->check( $activity_id ) ){
|
153 |
$rtmedia_activity_model->insert( array( 'activity_id' => $activity_id, 'user_id' => $user_id, 'privacy' => $privacy ) );
|
154 |
} else {
|
155 |
$rtmedia_activity_model->update( array( 'activity_id' => $activity_id, 'user_id' => $user_id, 'privacy' => $privacy ), array( 'activity_id' => $activity_id ) );
|
156 |
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
function bp_after_activity_post_form(){
|
161 |
+
$url = $_SERVER['REQUEST_URI'];
|
162 |
+
$url = trailingslashit( $url );
|
163 |
+
$allow_upload = apply_filters( 'rtmedia_allow_uploader_view', true, 'activity' );
|
164 |
+
if ( $allow_upload ){
|
165 |
+
$params = array(
|
166 |
+
'url' => ( isset( $url ) && ( false !== strpos( $url, '/media/' ) ) ) ? str_replace( '/media/', '/upload/', $url ) : 'upload/', 'runtimes' => 'html5,flash,html4', 'browse_button' => 'rtmedia-add-media-button-post-update', // browse button assigned to "Attach Files" Button.
|
167 |
+
'container' => 'rtmedia-whts-new-upload-container', 'drop_element' => 'whats-new-textarea', // drag-drop area assigned to activity update textarea
|
168 |
+
'filters' => apply_filters( 'rtmedia_plupload_files_filter', array( array( 'title' => __( 'Media Files', 'rtmedia' ), 'extensions' => get_rtmedia_allowed_upload_type() ) ) ), 'max_file_size' => min( array( ini_get( 'upload_max_filesize' ), ini_get( 'post_max_size' ) ) ), 'multipart' => true, 'urlstream_upload' => true, 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), 'file_data_name' => 'rtmedia_file', // key passed to $_FILE.
|
169 |
+
'multi_selection' => true, 'multipart_params' => apply_filters( 'rtmedia-multi-params', array( 'redirect' => 'no', 'rtmedia_update' => 'true', 'action' => 'wp_handle_upload', '_wp_http_referer' => $_SERVER['REQUEST_URI'], 'mode' => 'file_upload', 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator( false, true ) ) ), 'max_file_size_msg' => apply_filters( 'rtmedia_plupload_file_size_msg', min( array( ini_get( 'upload_max_filesize' ), ini_get( 'post_max_size' ) ) ) )
|
170 |
+
);
|
171 |
+
if ( wp_is_mobile() ){
|
172 |
+
$params['multi_selection'] = false;
|
173 |
+
}
|
174 |
+
$params = apply_filters( 'rtmedia_modify_upload_params', $params );
|
175 |
+
wp_enqueue_script( 'rtmedia-backbone', false, '', false, true );
|
176 |
+
$is_album = is_rtmedia_album() ? true : false;
|
177 |
+
$is_edit_allowed = is_rtmedia_edit_allowed() ? true : false;
|
178 |
+
wp_localize_script( 'rtmedia-backbone', 'is_album', $is_album );
|
179 |
+
wp_localize_script( 'rtmedia-backbone', 'is_edit_allowed', $is_edit_allowed );
|
180 |
+
wp_localize_script( 'rtmedia-backbone', 'rtMedia_update_plupload_config', $params );
|
181 |
+
|
182 |
+
$uploadView = new RTMediaUploadView( array( 'activity' => true ) );
|
183 |
+
$uploadView->render( 'uploader' );
|
184 |
+
} else {
|
185 |
+
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>';
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
function override_allowed_tags( $activity_allowedtags ){
|
190 |
+
|
191 |
+
$activity_allowedtags['video'] = array();
|
192 |
+
$activity_allowedtags['video']['id'] = array();
|
193 |
+
$activity_allowedtags['video']['class'] = array();
|
194 |
+
$activity_allowedtags['video']['src'] = array();
|
195 |
+
$activity_allowedtags['video']['controls'] = array();
|
196 |
+
$activity_allowedtags['video']['preload'] = array();
|
197 |
+
$activity_allowedtags['video']['alt'] = array();
|
198 |
+
$activity_allowedtags['video']['title'] = array();
|
199 |
+
$activity_allowedtags['video']['width'] = array();
|
200 |
+
$activity_allowedtags['video']['height'] = array();
|
201 |
+
$activity_allowedtags['video']['poster'] = array();
|
202 |
+
$activity_allowedtags['audio'] = array();
|
203 |
+
$activity_allowedtags['audio']['id'] = array();
|
204 |
+
$activity_allowedtags['audio']['class'] = array();
|
205 |
+
$activity_allowedtags['audio']['src'] = array();
|
206 |
+
$activity_allowedtags['audio']['controls'] = array();
|
207 |
+
$activity_allowedtags['audio']['preload'] = array();
|
208 |
+
$activity_allowedtags['audio']['alt'] = array();
|
209 |
+
$activity_allowedtags['audio']['title'] = array();
|
210 |
+
$activity_allowedtags['audio']['width'] = array();
|
211 |
+
$activity_allowedtags['audio']['poster'] = array();
|
212 |
+
$activity_allowedtags['div'] = array();
|
213 |
+
$activity_allowedtags['div']['id'] = array();
|
214 |
+
$activity_allowedtags['div']['class'] = array();
|
215 |
+
$activity_allowedtags['a'] = array();
|
216 |
+
$activity_allowedtags['a']['title'] = array();
|
217 |
+
$activity_allowedtags['a']['href'] = array();
|
218 |
+
$activity_allowedtags['ul'] = array();
|
219 |
+
$activity_allowedtags['ul']['class'] = array();
|
220 |
+
$activity_allowedtags['li'] = array();
|
221 |
+
$activity_allowedtags['li']['class'] = array();
|
222 |
+
|
223 |
+
/* Legacy Code */
|
224 |
+
//$activity_allowedtags[ 'script' ] = array( );
|
225 |
+
//$activity_allowedtags[ 'script' ][ 'type' ] = array( );
|
226 |
+
|
227 |
+
return $activity_allowedtags;
|
228 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
|
230 |
}
|
app/main/controllers/media/RTMediaAlbum.php
CHANGED
@@ -12,516 +12,518 @@
|
|
12 |
*/
|
13 |
class RTMediaAlbum {
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
*
|
464 |
-
*
|
465 |
-
*
|
466 |
-
*
|
467 |
-
* @
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
$
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
'
|
491 |
-
'
|
492 |
-
'
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
*
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
/**
|
517 |
-
* Convert an existing post, with attachments indexed by rtMedia to rtMedia album
|
518 |
-
* @param integer $post_id The post id to convert
|
519 |
-
*/
|
520 |
-
function post_to_album ( $post_id ) {
|
521 |
-
$album_id = $this->add ( $post[ 'post_title' ], $post[ 'post_author' ], false, $post_id );
|
522 |
-
$this->model->update (
|
523 |
-
array( 'album_id' => $album_id ), array( 'context' => $post[ 'post_type' ], 'context_id' => $post_id )
|
524 |
-
);
|
525 |
-
}
|
12 |
*/
|
13 |
class RTMediaAlbum {
|
14 |
|
15 |
+
/**
|
16 |
+
*
|
17 |
+
* @var type
|
18 |
+
*
|
19 |
+
* Media object associated with the album. It works as an interface
|
20 |
+
* for the actions specific the media from this album
|
21 |
+
*/
|
22 |
+
var $media;
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
add_action( 'init', array( &$this, 'register_post_types' ), 12 );
|
29 |
+
add_action( 'init', array( &$this, 'rtmedia_album_custom_post_status', 13 ) );
|
30 |
+
$this->media = new RTMediaMedia();
|
31 |
+
}
|
32 |
+
|
33 |
+
function rtmedia_album_custom_post_status() {
|
34 |
+
$args = array(
|
35 |
+
'label' => _x( 'hidden', 'Status General Name', 'rtmedia' ), 'label_count' => _n_noop( 'Hidden (%s)', 'Hidden (%s)', 'rtmedia' ), 'public' => false, 'show_in_admin_all_list' => false, 'show_in_admin_status_list' => false, 'exclude_from_search' => true,
|
36 |
+
);
|
37 |
+
register_post_status( 'hidden', $args );
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Register Custom Post Types required by rtMedia
|
43 |
+
*/
|
44 |
+
function register_post_types() {
|
45 |
+
|
46 |
+
/* Set up Album labels */
|
47 |
+
$album_labels = array(
|
48 |
+
'name' => __( 'Albums', 'rtmedia' ),
|
49 |
+
'singular_name' => __( 'Album', 'rtmedia' ),
|
50 |
+
'add_new' => __( 'Create', 'rtmedia' ),
|
51 |
+
'add_new_item' => __( 'Create Album', 'rtmedia' ),
|
52 |
+
'edit_item' => __( 'Edit Album', 'rtmedia' ),
|
53 |
+
'new_item' => __( 'New Album', 'rtmedia' ),
|
54 |
+
'all_items' => __( 'All Albums', 'rtmedia' ),
|
55 |
+
'view_item' => __( 'View Album', 'rtmedia' ),
|
56 |
+
'search_items' => __( 'Search Albums', 'rtmedia' ),
|
57 |
+
'not_found' => __( 'No album found', 'rtmedia' ),
|
58 |
+
'not_found_in_trash' => __( 'No album found in Trash', 'rtmedia' ),
|
59 |
+
'parent_item_colon' => __( 'Parent', 'rtmedia' ),
|
60 |
+
'menu_name' => __( 'Albums', 'rtmedia' )
|
61 |
+
);
|
62 |
+
|
63 |
+
$album_slug = apply_filters( 'rtmedia_album_rewrite_slug', 'rtmedia-album' );
|
64 |
+
|
65 |
+
$rewrite = array(
|
66 |
+
'slug' => $album_slug,
|
67 |
+
'with_front' => false,
|
68 |
+
'pages' => true,
|
69 |
+
'feeds' => false,
|
70 |
+
);
|
71 |
+
|
72 |
+
/* Set up Album post type arguments */
|
73 |
+
$album_args = array(
|
74 |
+
'labels' => $album_labels,
|
75 |
+
'public' => false,
|
76 |
+
'publicly_queryable' => false,
|
77 |
+
'show_ui' => false,
|
78 |
+
'show_in_menu' => false,
|
79 |
+
'query_var' => "rtmedia_album",
|
80 |
+
'capability_type' => 'post',
|
81 |
+
'has_archive' => false,
|
82 |
+
'hierarchical' => true,
|
83 |
+
'menu_position' => null,
|
84 |
+
'rewrite' => $rewrite,
|
85 |
+
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'comments' )
|
86 |
+
);
|
87 |
+
$album_args = apply_filters( 'rtmedia_albums_args', $album_args );
|
88 |
+
|
89 |
+
/* register Album post type */
|
90 |
+
register_post_type( 'rtmedia_album', $album_args );
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Method verifies the nonce passed while performing any CRUD operations
|
95 |
+
* on the album.
|
96 |
+
*
|
97 |
+
* @param type $mode
|
98 |
+
*
|
99 |
+
* @return boolean
|
100 |
+
*/
|
101 |
+
function verify_nonce( $mode ) {
|
102 |
+
|
103 |
+
$nonce = $_REQUEST[ "rtmedia_{$mode}_album_nonce" ];
|
104 |
+
$mode = $_REQUEST[ 'mode' ];
|
105 |
+
if ( wp_verify_nonce( $nonce, 'rtmedia_' . $mode ) ){
|
106 |
+
return true;
|
107 |
+
} else {
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* returns user_id of the current logged in user in wordpress
|
114 |
+
*
|
115 |
+
* @global type $current_user
|
116 |
+
* @return type
|
117 |
+
*/
|
118 |
+
function get_current_author() {
|
119 |
+
|
120 |
+
return apply_filters( 'rtmedia_current_user', get_current_user_id() );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Adds a new album
|
125 |
+
*
|
126 |
+
* @global type $rtmedia_interaction
|
127 |
+
*
|
128 |
+
* @param type $title
|
129 |
+
* @param type $author_id
|
130 |
+
* @param type $new
|
131 |
+
* @param type $post_id
|
132 |
+
*
|
133 |
+
* @return type
|
134 |
+
*/
|
135 |
+
function add( $title = '', $author_id = false, $new = true, $post_id = false, $context = false, $context_id = false ) {
|
136 |
+
|
137 |
+
global $rtmedia_interaction;
|
138 |
+
/* action to perform any task before adding the album */
|
139 |
+
do_action( 'rtmedia_before_add_album' );
|
140 |
+
|
141 |
+
$author_id = $author_id ? $author_id : $this->get_current_author();
|
142 |
+
|
143 |
+
/* Album Details which will be passed to Database query to add the album */
|
144 |
+
$post_vars = array(
|
145 |
+
'post_title' => ( empty ( $title ) ) ? __( 'Untitled Album', 'rtmedia' ) : $title, 'post_type' => 'rtmedia_album', 'post_author' => $author_id, 'post_status' => 'hidden'
|
146 |
+
);
|
147 |
+
|
148 |
+
/* Check whether to create a new album in wp_post table
|
149 |
+
* This is the case when a user creates a album of his own. We need to
|
150 |
+
* create a separte post in wp_post which will work as parent for
|
151 |
+
* all the media uploaded to that album
|
152 |
+
*
|
153 |
+
* */
|
154 |
+
if ( $new ){
|
155 |
+
$album_id = wp_insert_post( $post_vars );
|
156 |
+
} /**
|
157 |
+
* if user uploads any media directly to a post or a page or any custom
|
158 |
+
* post then the context in which the user is uploading a media becomes
|
159 |
+
* an album in itself. We do not need to create a separate album in this
|
160 |
+
* case.
|
161 |
+
*/ else {
|
162 |
+
$album_id = $post_id;
|
163 |
+
}
|
164 |
+
|
165 |
+
$current_album = get_post( $album_id, ARRAY_A );
|
166 |
+
if ( $context === false ){
|
167 |
+
$context = ( isset ( $rtmedia_interaction->context->type ) ) ? $rtmedia_interaction->context->type : null;
|
168 |
+
}
|
169 |
+
if ( $context_id === false ){
|
170 |
+
$context_id = ( isset ( $rtmedia_interaction->context->id ) ) ? $rtmedia_interaction->context->id : null;
|
171 |
+
}
|
172 |
+
// add in the media since album is also a media
|
173 |
+
//defaults
|
174 |
+
|
175 |
+
$attributes = array(
|
176 |
+
'blog_id' => get_current_blog_id(), 'media_id' => $album_id, 'album_id' => null, 'media_title' => $current_album[ 'post_title' ], 'media_author' => $current_album[ 'post_author' ], 'media_type' => 'album', 'context' => $context, 'context_id' => $context_id, 'activity_id' => null, 'privacy' => null
|
177 |
+
);
|
178 |
+
$attributes = apply_filters( "rtmedia_before_save_album_attributes", $attributes, $_POST );
|
179 |
+
$rtmedia_id = $this->media->insert_album( $attributes );
|
180 |
+
$rtMediaNav = new RTMediaNav();
|
181 |
+
$media_count = $rtMediaNav->refresh_counts( $context_id, array( "context" => $context, 'media_author' => $context_id ) );
|
182 |
+
/* action to perform any task after adding the album */
|
183 |
+
global $rtmedia_points_media_id;
|
184 |
+
$rtmedia_points_media_id = $rtmedia_id;
|
185 |
+
do_action( 'rtmedia_after_add_album', $this );
|
186 |
+
|
187 |
+
return $rtmedia_id;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Wrapper method to add a global album
|
192 |
+
*
|
193 |
+
* @param type $title
|
194 |
+
*
|
195 |
+
* @return boolean
|
196 |
+
*/
|
197 |
+
function add_global( $title = '' ) {
|
198 |
+
|
199 |
+
// $super_user_ids = get_super_admins();
|
200 |
+
$author_id = $this->get_current_author();
|
201 |
+
/**
|
202 |
+
* only admin privilaged user can add a global album
|
203 |
+
*/
|
204 |
+
if ( current_user_can( 'activate_plugins' ) ){
|
205 |
+
|
206 |
+
$album_id = $this->add( $title, $author_id, true, false );
|
207 |
+
|
208 |
+
$this->save_globals( $album_id );
|
209 |
+
|
210 |
+
return $album_id;
|
211 |
+
} else {
|
212 |
+
return false;
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Get the list of all global albums
|
218 |
+
*
|
219 |
+
* @return type
|
220 |
+
*/
|
221 |
+
static function get_globals() {
|
222 |
+
return rtmedia_get_site_option( 'rtmedia-global-albums' );
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* There is a default global album which works as a Wall Post Album for the
|
227 |
+
* user.
|
228 |
+
*
|
229 |
+
* @return type
|
230 |
+
*/
|
231 |
+
static function get_default() {
|
232 |
+
$albums = self::get_globals();
|
233 |
+
if ( isset ( $albums[ 0 ] ) ){
|
234 |
+
return $albums[ 0 ];
|
235 |
+
} else {
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Save global albums for newly added album
|
242 |
+
*
|
243 |
+
* @param type $album_ids
|
244 |
+
*
|
245 |
+
* @return boolean
|
246 |
+
*/
|
247 |
+
function save_globals( $album_ids = false ) {
|
248 |
+
|
249 |
+
if ( ! $album_ids ){
|
250 |
+
return false;
|
251 |
+
}
|
252 |
+
|
253 |
+
$albums = self::get_globals();
|
254 |
+
|
255 |
+
if ( ! $albums ){
|
256 |
+
$albums = array();
|
257 |
+
}
|
258 |
+
|
259 |
+
if ( ! is_array( $album_ids ) ){
|
260 |
+
$album_ids = array( $album_ids );
|
261 |
+
}
|
262 |
+
|
263 |
+
$albums = array_merge( $albums, $album_ids );
|
264 |
+
rtmedia_update_site_option( 'rtmedia-global-albums', $albums );
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Wrapper method to update details for any global album
|
269 |
+
*
|
270 |
+
* @param type $id
|
271 |
+
* @param type $title
|
272 |
+
*
|
273 |
+
* @return boolean
|
274 |
+
*/
|
275 |
+
function update_global( $id, $title = '' ) {
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Only admin can update global albums
|
279 |
+
*/
|
280 |
+
$super_user_ids = get_super_admins();
|
281 |
+
if ( in_array( $this->get_current_author(), $super_user_ids ) ){
|
282 |
+
|
283 |
+
return $this->update( $id, $title );
|
284 |
+
} else {
|
285 |
+
return false;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Update any album. Generic method for all the user.
|
291 |
+
*
|
292 |
+
* @param type $id
|
293 |
+
* @param type $title
|
294 |
+
*
|
295 |
+
* @return boolean
|
296 |
+
*/
|
297 |
+
function update( $id, $title = '' ) {
|
298 |
+
|
299 |
+
/* Action to perform before updating the album */
|
300 |
+
do_action( 'rtmedia_before_update_album', $this );
|
301 |
+
if ( empty ( $title ) && empty ( $id ) ){
|
302 |
+
return false;
|
303 |
+
} else {
|
304 |
+
|
305 |
+
$args = array(
|
306 |
+
'ID' => $id, 'post_title' => $title
|
307 |
+
);
|
308 |
+
$status = wp_insert_post( $args );
|
309 |
+
if ( is_wp_error( $status ) || $status == 0 ){
|
310 |
+
return false;
|
311 |
+
} else {
|
312 |
+
/* Action to perform after updating the album */
|
313 |
+
do_action( 'rtmedia_after_update_album', $this );
|
314 |
+
|
315 |
+
return true;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Wrapper method to delete a global album
|
322 |
+
*
|
323 |
+
* @param type $id
|
324 |
+
*
|
325 |
+
* @return boolean
|
326 |
+
*/
|
327 |
+
function delete_global( $id ) {
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Only admin can delete a global album
|
331 |
+
*/
|
332 |
+
$super_user_ids = get_super_admins();
|
333 |
+
if ( in_array( $this->get_current_author(), $super_user_ids ) ){
|
334 |
+
|
335 |
+
$default_album = self::get_default();
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Default album is NEVER deleted.
|
339 |
+
*/
|
340 |
+
if ( $id == $default_album ){
|
341 |
+
return false;
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* If a global album is deleted then all the media of that album
|
346 |
+
* is merged to the default global album and then the album is deleted.
|
347 |
+
*/
|
348 |
+
//merge with the default album
|
349 |
+
$this->merge( $default_album, $id );
|
350 |
+
|
351 |
+
return $this->delete( $id );
|
352 |
+
} else {
|
353 |
+
return false;
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Generic method to delete any album
|
359 |
+
*
|
360 |
+
* @param type $id
|
361 |
+
*
|
362 |
+
* @return type
|
363 |
+
*/
|
364 |
+
function delete( $id ) {
|
365 |
+
|
366 |
+
/* action to perform any task befor deleting an album */
|
367 |
+
do_action( 'rtmedia_before_delete_album', $this );
|
368 |
+
|
369 |
+
/**
|
370 |
+
* First fetch all the media from that album
|
371 |
+
*/
|
372 |
+
add_filter( 'rt_db_model_per_page', array( $this, 'set_queries_per_page' ), 10, 2 );
|
373 |
+
$page = 1;
|
374 |
+
$flag = true;
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Delete each media from the album first
|
378 |
+
*/
|
379 |
+
while ( $media = $this->media->model->get_by_album_id( $id, $page ) ) {
|
380 |
+
|
381 |
+
$media_id = $media[ 'result' ][ 0 ][ 'media_id' ];
|
382 |
+
|
383 |
+
$flag = wp_delete_attachment( $media_id );
|
384 |
+
|
385 |
+
if ( ! $flag ){
|
386 |
+
break;
|
387 |
+
}
|
388 |
+
|
389 |
+
$page ++;
|
390 |
+
}
|
391 |
+
|
392 |
+
/**
|
393 |
+
* If all the media are deleted from the album then delete the album at last.
|
394 |
+
*/
|
395 |
+
if ( $flag ){
|
396 |
+
$this->media->delete( $id );
|
397 |
+
}
|
398 |
+
|
399 |
+
/* action to perform any task after deleting an album */
|
400 |
+
do_action( 'rtmedia_after_delete_album', $this );
|
401 |
+
|
402 |
+
return $flag;
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Helper function to set number of queries in pagination
|
407 |
+
*
|
408 |
+
* @param int $per_page
|
409 |
+
* @param type $table_name
|
410 |
+
*
|
411 |
+
* @return int
|
412 |
+
*/
|
413 |
+
function set_queries_per_page( $per_page, $table_name ) {
|
414 |
+
|
415 |
+
$per_page = 1;
|
416 |
+
|
417 |
+
return $per_page;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Generic function to merge two albums
|
422 |
+
*
|
423 |
+
* @param type $primary_album_id
|
424 |
+
* @param type $secondary_album_id
|
425 |
+
*
|
426 |
+
* @return type
|
427 |
+
*/
|
428 |
+
function merge( $primary_album_id, $secondary_album_id ) {
|
429 |
+
|
430 |
+
add_filter( 'rt_db_model_per_page', array( $this, 'set_queries_per_page' ), 10, 2 );
|
431 |
+
$page = 1;
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Transfer all the media from secondary album to primary album
|
435 |
+
*/
|
436 |
+
while ( $media = $this->media->model->get_by_album_id( $secondary_album_id, $page ) ) {
|
437 |
+
|
438 |
+
$media_id = $media[ 'result' ][ 0 ][ 'media_id' ];
|
439 |
+
$this->media->move( $media_id, $primary_album_id );
|
440 |
+
|
441 |
+
$page ++;
|
442 |
+
}
|
443 |
+
|
444 |
+
$author = $this->get_current_author();
|
445 |
+
$admins = get_super_admins();
|
446 |
+
$global_albums = self::get_globals();
|
447 |
+
|
448 |
+
if ( in_array( $secondary_album_id, $global_albums ) ){
|
449 |
+
if ( in_array( $author, $admins ) ){
|
450 |
+
$this->delete_global( $secondary_album_id );
|
451 |
+
} else {
|
452 |
+
return false;
|
453 |
+
}
|
454 |
+
} else {
|
455 |
+
$this->delete( $secondary_album_id );
|
456 |
+
}
|
457 |
+
|
458 |
+
return $primary_album_id;
|
459 |
+
}
|
460 |
+
|
461 |
+
// Legacy code
|
462 |
+
// /**
|
463 |
+
// * Convert a post which is not indexed in rtMedia to an album.
|
464 |
+
// *
|
465 |
+
// * All the attachments from that post will become media of the new album.
|
466 |
+
// *
|
467 |
+
// * @global type $wpdb
|
468 |
+
// * @param type $post_id
|
469 |
+
// * @return boolean
|
470 |
+
// */
|
471 |
+
// function convert_post ( $post_id ) {
|
472 |
+
//
|
473 |
+
// global $wpdb;
|
474 |
+
// /**
|
475 |
+
// * Fetch all the attachments from the given post
|
476 |
+
// */
|
477 |
+
// $attachment_ids = $wpdb->get_results ( "SELECT ID
|
478 |
+
// FROM $wpdb->posts
|
479 |
+
// WHERE post_parent = $post_id" );
|
480 |
+
//
|
481 |
+
// /**
|
482 |
+
// * Create a album. Not a new album. Just give index to this post in rtMedia
|
483 |
+
// */
|
484 |
+
// $album_id = $this->add ( $post[ 'post_title' ], $post[ 'post_author' ], false, $post_id );
|
485 |
+
//
|
486 |
+
// $album_data = $this->model->get_by_media_id ( $album_id );
|
487 |
+
//
|
488 |
+
// /* Album details */
|
489 |
+
// $album_meta = array(
|
490 |
+
// 'album_id' => $album_id,
|
491 |
+
// 'context' => $album_data[ 'results' ][ 0 ][ 'context' ],
|
492 |
+
// 'context_id' => $album_data[ 'results' ][ 0 ][ 'context_id' ],
|
493 |
+
// 'activity_id' => $album_data[ 'results' ][ 0 ][ 'activity_id' ],
|
494 |
+
// 'privacy' => $album_data[ 'results' ][ 0 ][ 'privacy' ]
|
495 |
+
// );
|
496 |
+
//
|
497 |
+
// /**
|
498 |
+
// * Index attachments in rtMedia
|
499 |
+
// */
|
500 |
+
// $this->media->insertmedia ( $attachment_ids, $album_meta );
|
501 |
+
//
|
502 |
+
// return true;
|
503 |
+
// }
|
504 |
+
//
|
505 |
+
// /**
|
506 |
+
// * Check if a post is being indexed as an rtMedia album
|
507 |
+
// * @param integer $post_id the post id to check
|
508 |
+
// * @return boolean if a post is an rtmedia album
|
509 |
+
// */
|
510 |
+
// function is_post_album ( $post_id ) {
|
511 |
+
// $album = $this->model->get ( array( 'album_id' => $post_id ) );
|
512 |
+
// if ( ! empty ( $album ) && count ( $album ) > 0 ) {
|
513 |
+
// return true;
|
514 |
+
// }
|
515 |
+
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|