diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php index 25c12b3..2c8da88 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php @@ -14,11 +14,10 @@ function bp_dedication_send_dedication_notification( $post_id, $to_user_email, $ /* Let's grab both user's names to use in the email. */ $sender_ud = get_userdata( $from_user_id ); - - $sender_username = $sender_ud->user_login; $sender_name = bp_core_get_user_displayname( $sender_username ); - //$reciever_name = bp_core_get_user_displayname( $to_user_id, false ); + + //$reciever_name = bp_core_get_user_displayname( $to_user_id, false ); /* Now we need to construct the URL's that we are going to use in the email */ @@ -28,6 +27,13 @@ function bp_dedication_send_dedication_notification( $post_id, $to_user_email, $ $post_link = get_option('siteurl') . '/index.php'; $post_link = add_query_arg('refid', $enc_link, $post_link); + + // existe el destinatario como usuario? + $reciever_ud = get_user_by('email', $to_user_email); + if ($reciever_ud) { + $post_link = add_query_arg('y', '1', $post_link); + } + //$post_link = bp_dedication_getTinyUrl($post_link); /* Set up and send the message */ diff --git a/wp-content/themes/score/functions.php b/wp-content/themes/score/functions.php index 316ef63..90c78c9 100644 --- a/wp-content/themes/score/functions.php +++ b/wp-content/themes/score/functions.php @@ -656,7 +656,12 @@ add_filter('query_vars', 'add_fs_var'); function play_video_on_full_screen() { $fs = get_query_var('fs'); - return ($fs == '1'); + return ($fs && ($fs != '0')); +} + +function play_video_for_registeres_user() { + $fs = get_query_var('fs'); + return ($fs == '2'); } if(!function_exists('_log')){ @@ -689,7 +694,12 @@ function gp_encoded_dedication_redirect_for_nonusers($current_uri, $redirect_to) if (key_exists('refid', $args)) { setcookie("refid", 1, time()+60, SITECOOKIEPATH); // Cookie con 1 minuto de validez $decoded_url = bp_dedication_decode($args['refid']); - return add_query_arg('fs', 1, $decoded_url); + if (key_exists('y', $args)) { + $decoded_url = add_query_arg('fs', 2, $decoded_url); // Para usuarios que están registrados + } else { + $decoded_url = add_query_arg('fs', 1, $decoded_url); // Para usuarios no registrados + } + return $decoded_url; } else return $current_uri; } @@ -701,7 +711,12 @@ function gp_encoded_dedication_redirect_for_users() { wp_parse_str($_SERVER['QUERY_STRING'], $args); if (key_exists('refid', $args)) { $decoded_url = bp_dedication_decode($args['refid']); - wp_redirect(add_query_arg('fs', 1, $decoded_url)); + if (key_exists('y', $args)) { + $decoded_url = add_query_arg('fs', 2, $decoded_url); // Para usuarios que están registrados + } else { + $decoded_url = add_query_arg('fs', 1, $decoded_url); // Para usuarios no registrados + } + wp_redirect($decoded_url); } } } diff --git a/wp-content/themes/score/video-slider.php b/wp-content/themes/score/video-slider.php index c108780..5758407 100644 --- a/wp-content/themes/score/video-slider.php +++ b/wp-content/themes/score/video-slider.php @@ -182,7 +182,11 @@ if (have_posts()) { window.location.href = ""; - window.location.href = "/register/"; + + window.location.href = "/login/"; + + window.location.href = "/register/"; + }