diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-functions.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-functions.php index 5703ebf..c845117 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-functions.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-functions.php @@ -85,4 +85,36 @@ function fopen_fetch_image($url) { return $image; } +if ( !defined( 'DECODE_ENCODE_KEY' ) ) + define( 'DECODE_ENCODE_KEY', 'asong2u' ); + +function bp_dedication_encode($string) { + $key = sha1($key); + $strLen = strlen($string); + $keyLen = strlen($key); + for ($i = 0; $i < $strLen; $i++) { + $ordStr = ord(substr($string,$i,1)); + if ($j == $keyLen) { $j = 0; } + $ordKey = ord(substr($key,$j,1)); + $j++; + $hash .= strrev(base_convert(dechex($ordStr + $ordKey),16,36)); + } + return $hash; +} + +function bp_dedication_decode($string) { + $key = sha1($key); + $strLen = strlen($string); + $keyLen = strlen($key); + for ($i = 0; $i < $strLen; $i+=2) { + $ordStr = hexdec(base_convert(strrev(substr($string,$i,2)),36,16)); + if ($j == $keyLen) { $j = 0; } + $ordKey = ord(substr($key,$j,1)); + $j++; + $hash .= chr($ordStr - $ordKey); + } + return $hash; +} + + ?> 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 9cd9cfe..3255e2e 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php @@ -14,7 +14,11 @@ function bp_dedication_send_dedication_notification( $post_id, $to_user_id, $fro /* Now we need to construct the URL's that we are going to use in the email */ $sender_profile_link = bp_core_get_userlink($from_user_id, false, true); $sender_new_dedication_link = bp_core_get_userlink($to_user_id, false, true) . $bp->dedications->slug . '/new-dedication/user/' . $from_user_id; - $post_link = get_permalink($post_id); + + $enc_link = bp_dedication_encode(get_permalink($post_id)); + + $post_link = get_option('siteurl') . '/index.php'; + $post_link = add_query_arg('refid', $enc_link, $post_link); /* Set up and send the message */ $to = $reciever_ud->user_email; diff --git a/wp-content/themes/score/functions.php b/wp-content/themes/score/functions.php index dba8edb..08b0dd9 100644 --- a/wp-content/themes/score/functions.php +++ b/wp-content/themes/score/functions.php @@ -194,9 +194,9 @@ function gp_enqueue_scripts() { if (!is_admin()) { wp_enqueue_script('jquery'); - wp_enqueue_script('jqueryui'); + //wp_enqueue_script('jqueryui'); - //wp_enqueue_script('jqueryui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js', array('jquery')); + wp_enqueue_script('jqueryui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js', array('jquery')); if (is_singular()) wp_enqueue_script('comment-reply'); @@ -215,10 +215,10 @@ function gp_enqueue_scripts() { wp_enqueue_script('froogaloop', get_template_directory_uri() . '/lib/scripts/videoslider/js/froogaloop.min.js', array('jquery')); wp_enqueue_script('apPlaylistManager', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.apPlaylistManager.min.js', array('jquery')); - wp_enqueue_script('apYoutubePlayer', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.apYoutubePlayer.js', array('jquery')); - wp_enqueue_script('apVimeoPlayer', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.apVimeoPlayer.js', array('jquery')); - //wp_enqueue_script('videoGallery', get_template_directory_uri().'/lib/scripts/videoslider/js/jquery.videoGallery.min.js', array('jquery')); - wp_enqueue_script('videoGallery', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.videoGallery.js', array('jquery')); + wp_enqueue_script('apYoutubePlayer', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.apYoutubePlayer.min.js', array('jquery')); + wp_enqueue_script('apVimeoPlayer', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.apVimeoPlayer.min.js', array('jquery')); + wp_enqueue_script('videoGallery', get_template_directory_uri().'/lib/scripts/videoslider/js/jquery.videoGallery.min.js', array('jquery')); + //wp_enqueue_script('videoGallery', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.videoGallery.js', array('jquery')); wp_enqueue_script('mousewheel', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.mousewheel.js', array('jquery')); //wp_enqueue_script('sharrre', get_template_directory_uri() . '/lib/scripts/videoslider/js/jquery.sharrre-1.3.0.min.js', array('jquery')); @@ -624,4 +624,65 @@ function cutstr($str, $length, $ellipsis=''){ } + +function add_fs_var($public_query_vars) { + $public_query_vars[] = 'fs'; + return $public_query_vars; +} +add_filter('query_vars', 'add_fs_var'); + + +function play_video_on_full_screen() { + $fs = get_query_var('fs'); + return ($fs == '1'); +} + +if(!function_exists('_log')){ + function _log( $message ) { + if( WP_DEBUG === true ){ + if( is_array( $message ) || is_object( $message ) ){ + error_log( print_r( $message, true ) ); + } else { + error_log( $message ); + } + } + } +} + +function make_encoded_dedications_visible_for_nonusers($visibility) { + if(isset($_COOKIE['refid'])) { + setcookie('refid','',time()-3600, SITECOOKIEPATH); + $_COOKIE['refid'] = null; + unset( $_COOKIE['refid'] ); + // Puede ser visible + return false; + } else { + return $visibility; + } +} +add_filter('pbp_login_required_check', 'make_encoded_dedications_visible_for_nonusers', 1); + +function gp_encoded_dedication_redirect_for_nonusers($current_uri, $redirect_to) { + wp_parse_str($_SERVER['QUERY_STRING'], $args); + 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); + } + else return $current_uri; +} +add_filter('pbp_redirect_login_page', 'gp_encoded_dedication_redirect_for_nonusers', 1, 2); + + +function gp_encoded_dedication_redirect_for_users() { + if ( true == is_user_logged_in() ) { + 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)); + } + } +} +add_action('wp', 'gp_encoded_dedication_redirect_for_users', 2); + ?> \ No newline at end of file diff --git a/wp-content/themes/score/header.php b/wp-content/themes/score/header.php index 18a0817..5bb67a0 100644 --- a/wp-content/themes/score/header.php +++ b/wp-content/themes/score/header.php @@ -78,10 +78,10 @@
+ +
+ - -
-
diff --git a/wp-content/themes/score/lib/scripts/custom.php b/wp-content/themes/score/lib/scripts/custom.php index 499f67c..09c4571 100644 --- a/wp-content/themes/score/lib/scripts/custom.php +++ b/wp-content/themes/score/lib/scripts/custom.php @@ -2,18 +2,20 @@ jQuery(document).ready(function(){ jQuery('.controls_fullscreen').css('cursor', 'pointer'); + _fullscreen = jQuery('.controls_fullscreen').children('img'); _srcimg = _fullscreen.attr('src'); - + _fullscreen.bind('click', function(){ if (jQuery('#the_slider').hasClass('fullscreen_div')) { jQuery('#the_slider').removeClass('fullscreen_div'); - _fullscreen.attr('src', _srcimg.replace('_exit.png', '.png')); - jQuery('#the_slider').toggleFullScreen() + jQuery('.mediaWrapper').css('width', ''); + jQuery('.youtubeHolder').css('width', ''); + jQuery('.vimeoHolder').css('width', ''); + _fullscreen.attr('src', _srcimg.replace('fullscreen_exit.png', 'fullscreen.png')); } else { jQuery('#the_slider').addClass('fullscreen_div'); - _fullscreen.attr('src', _srcimg.replace('.png', '_exit.png')); - jQuery('#the_slider').toggleFullScreen() + _fullscreen.attr('src', _srcimg.replace('fullscreen.png', 'fullscreen_exit.png')); } }); }); @@ -34,191 +36,4 @@ jQuery(document).ready(function(){ }); }); -/*************************** File Directories ***************************/ - -var rootFolder=''; - - -/*************************** Remove Javascript Disabled Class ***************************/ - -var el = document.getElementsByTagName("html")[0]; -el.className = ""; - -/*************************** Toggle Share Link ***************************/ - -jQuery(document).ready(function(){ - - jQuery("#share-review").hide(); - jQuery("#share-review-link a").html(""); - - jQuery("#share-review-link a").toggle(function(){ - jQuery(this).html(""); - }, function () { - jQuery(this).html(""); - }); - - jQuery("#share-review-link a").click(function(){ - jQuery(this).next("#share-review").slideToggle('fast'); - }); - -}); - - -/*************************** Transform Select Drop Down Forms ***************************/ - -jQuery(document).ready(function() { - - jQuery("#dropdown-filter").show(); - jQuery(".order-by-form").jqTransform(); - jQuery(".order-form").jqTransform(); - - jQuery(".order-by-form .jqTransformSelectWrapper ul li a").click(function(){ - var index = jQuery(this).attr('index'); - var value = jQuery('.order-by-form select.jqTransformHidden option:eq('+index+')').attr('value'); - window.location.href=value; - }); - - jQuery(".order-form .jqTransformSelectWrapper ul li a").click(function(){ - var index = jQuery(this).attr('index'); - var value = jQuery('.order-form select.jqTransformHidden option:eq('+index+')').attr('value'); - window.location.href=value; - }); - -}); - - -/*************************** Marquee Width ***************************/ - -jQuery(window).load(function() { - - jQuery("#scroller-marquee").show(); - var socialWidth = jQuery("#social-icons").width(); - var scrollertitleWidth = jQuery("#scroller-title").width(); - - if(socialWidth > 0) { - jQuery("#scroller").css({"width" : 840 - socialWidth}); - jQuery("#scroller #scroller-marquee").css({"width" : 840 - socialWidth - scrollertitleWidth}); - } else { - jQuery("#scroller").css({"width" : 920}); - jQuery("#scroller #scroller-marquee").css({"width" : 920 - scrollertitleWidth}); - } - -}); - - -/*************************** Profile Details Height ***************************/ - -jQuery(document).ready(function(){ - - var profiledetailsHeight = jQuery(".profile-details").height(); - if(profiledetailsHeight > 90) { - jQuery(".profile-avatar").css({"height" : profiledetailsHeight}); - } -}); - - -/*************************** Gallery Shortcode Lightbox Support ***************************/ - -jQuery(document).ready(function(){ - - jQuery("div.gallery-item .gallery-icon a").attr("rel", "prettyPhoto[gallery]"); - -}); - - -/*************************** Lightbox ***************************/ - -function gp_lightbox() { - - jQuery("a[rel^='prettyPhoto']").prettyPhoto({ - theme: 'pp_default', - deeplinking: false, - social_tools: '' - }); - -} - -jQuery(document).ready(function(){ - gp_lightbox(); -}); - - -/*************************** Lightbox Image Hover ***************************/ - -function gp_image_hover() { - - jQuery("a[rel^='prettyPhoto']").hover( - function() { - jQuery(this).find("img").stop().fadeTo(750, 0.5); - }, - function() { - jQuery(this).find("img").stop().fadeTo(750, 1); - } - ); - -} - -jQuery(document).ready(function(){ - gp_image_hover(); -}); - - -/*************************** Back To Top ***************************/ - -jQuery(document).ready(function() { - jQuery(".back-to-top").click(function() { - jQuery("html, body").animate({ scrollTop: 0 }, 'slow'); - }); -}); - - -/*************************** Accordion ***************************/ - -jQuery(document).ready(function(){ - - jQuery(".accordion").accordion({ header: "h3.accordion-title", autoHeight: false }); - jQuery("h3.accordion-title").toggle(function(){ - jQuery(this).addClass("active"); - }, function () { - jQuery(this).removeClass("active"); - }); - -}); - - -/*************************** Tabs ***************************/ - -jQuery(document).ready(function(){ - - jQuery(".sc-tabs").tabs({ - fx: { - height:'toggle', - duration:'fast' - } - }); - -}); - - -/*************************** Toggle Content ***************************/ - -jQuery(document).ready(function(){ - - jQuery(".toggle-box").hide(); - - jQuery(".toggle").toggle(function(){ - jQuery(this).addClass("toggle-active"); - }, function () { - jQuery(this).removeClass("toggle-active"); - }); - - jQuery(".toggle").click(function(){ - jQuery(this).next(".toggle-box").slideToggle(); - }); - -}); - - - - \ No newline at end of file diff --git a/wp-content/themes/score/lib/scripts/videoslider/css/videoGallery.css b/wp-content/themes/score/lib/scripts/videoslider/css/videoGallery.css index d3468da..8a8e5b4 100644 --- a/wp-content/themes/score/lib/scripts/videoslider/css/videoGallery.css +++ b/wp-content/themes/score/lib/scripts/videoslider/css/videoGallery.css @@ -10,7 +10,7 @@ position:absolute; top:0px; left:0px; - width:100%; + width:940px; height:500px; overflow:hidden; } @@ -314,4 +314,167 @@ position:absolute; position:absolute; top:0px; left:90px; +} + + +.fullscreen_div { + height:100%; + width:100%; + position:fixed; + left:0; + top:0; + z-index:111 !important; + background-color:black; +} + +.fullscreen_div #slider-wrapper { + height:100%; + width:100%; + position:fixed; + left:0; + top:0; +} + + +.fullscreen_div #componentWrapper{ + height:100%; +} + +/* wrapper for video */ +.fullscreen_div #componentWrapper .mediaWrapper, +.fullscreen_div #componentWrapper .youtubeHolder, +.fullscreen_div #componentWrapper .vimeoHolder { + position:absolute; + top:0px; + left:0px; + width:100% !important; + height:100%; + overflow:hidden; +} + +.fullscreen_div #dedicationTitle_container { + height: 100px; +} + +.fullscreen_div .dedicationTitle_logo { + display: block; + position: absolute; + float: left; + margin: 18px 0 0 18px; +} + +.fullscreen_div #dedicationTitle_container #dedicationTitle-data-panel { + display: block; + width: 100%; + font-size: 26px; + margin-top: 10px; +} + +.fullscreen_div #dedicationTitle_container #dedicationTitle-data-panel img.dedicationFlag { + height: 32px; + margin-top: -8px; + vertical-align: middle; + width: 32px; +} + +.fullscreen_div #dedicationTitle_container #dedicationTitle-data-panel span { + display: inline-block; + font-weight: bold; +} + +.fullscreen_div #dedicationTitle_container #dedicationTitle-data-panel span:first-of-type { + margin-right: 30px; +} + +.fullscreen_div #dedicationTitle_container h2 { +} + + + +.fullscreen_div #dedicationFooter_container { + position: absolute; + width: 100%; + left: 0; + bottom: 0; + display: none !important; +} + +.fullscreen_div #componentWrapper .thumbHolder{ + position:absolute; + top:0px; + width:0px;/* hidden on beginning */ + height:100%; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.6); + overflow:hidden; +} + +.fullscreen_div #componentWrapper .thumbContainer{ + position:absolute; + height:100%; + top:40px; + left:0px; + /*background:#9C9;*/ +} + +.fullscreen_div #componentWrapper .thumbInnerContainer{ + position:absolute; + height:100%; + top:0px; + left:10px; +} + +.fullscreen_div #componentWrapper .thumbBackward{ + position:absolute; + width:170px; + height:40px; + top:0px; + left:0px; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.6); + display:none; +} + +.fullscreen_div #componentWrapper .thumbBackward img{ + position:absolute; + display:block; + width:31px; + height:21px; + top:50%; + left:50%; + margin-left:-15px; + margin-top:-14px; +} + +#componentWrapper .thumbForward{ + position:absolute; + width:170px; + height:40px; + bottom:0px; + left:0px; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.6); + display:none; +} + +#componentWrapper .thumbForward img{ + position:absolute; + display:block; + width:31px; + height:21px; + top:50%; + left:50%; + margin-left:-15px; + margin-top:-10px; +} + +#componentWrapper .thumb_title{ + position:absolute; + width:160px; + color:#e5e5e5; + padding: 10px 20px 10px 20px; + font-family: 'Terminal Dosis', sans-serif; + font-size:20px; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.6); } \ No newline at end of file diff --git a/wp-content/themes/score/lib/scripts/videoslider/js/jquery.apYoutubePlayer.min.js b/wp-content/themes/score/lib/scripts/videoslider/js/jquery.apYoutubePlayer.min.js index 9636e54..b81ee72 100644 --- a/wp-content/themes/score/lib/scripts/videoslider/js/jquery.apYoutubePlayer.min.js +++ b/wp-content/themes/score/lib/scripts/videoslider/js/jquery.apYoutubePlayer.min.js @@ -1 +1 @@ -(function(c){function i(a){d=c(this);a=_youtubeChromeless?"http://www.youtube.com/embed/"+a+"?controls=0&showinfo=0&enablejsapi=1&wmode=transparent":"http://www.youtube.com/embed/"+a+"?enablejsapi=1&wmode=transparent";a=c("