Fixed upload video

parent 59e0f5e2
...@@ -102,7 +102,8 @@ div.etn-single-event-media img.wp-post-image { ...@@ -102,7 +102,8 @@ div.etn-single-event-media img.wp-post-image {
} }
.sh_loginbutton:hover .sh_loginpopup, .sh_loginpopup:hover, .sh_loginbutton:active .sh_loginpopup, .sh_loginpopup:focus-within { .sh_loginbutton:hover .sh_loginpopup, .sh_loginpopup:hover, .sh_loginbutton:active .sh_loginpopup, .sh_loginpopup:focus-within,
.sh_freememberacc:hover .sh_upgradepopup, .sh_upgradepopup:hover, .sh_freememberacc:active .sh_upgradepopup, .sh_upgradepopup:focus-within {
display:block; display:block;
} }
...@@ -120,6 +121,7 @@ div.etn-single-event-media img.wp-post-image { ...@@ -120,6 +121,7 @@ div.etn-single-event-media img.wp-post-image {
border: grey 1px solid; border: grey 1px solid;
} }
li.sh_signupmenu a, li a.sh_signupmenu { li.sh_signupmenu a, li a.sh_signupmenu {
background-color: #801939; background-color: #801939;
border-radius: 20px 20px 20px 20px; border-radius: 20px 20px 20px 20px;
...@@ -136,17 +138,33 @@ li.sh_signupmenu a:after, li a.sh_signupmenu:after { ...@@ -136,17 +138,33 @@ li.sh_signupmenu a:after, li a.sh_signupmenu:after {
border-radius: 10px; border-radius: 10px;
} }
.sh_freememberacc {
background-color: #801939;
border-radius: 20px 20px 20px 20px;
}
.sh_upgradepopup {
display: none;
background-color: #000000;
position: absolute;
padding: 10px;
z-index: 999;
margin-top:-4px;
border: grey 1px solid;
}
li.sh_freememberacc a, li a.sh_freememberacc { li.sh_freememberacc a, li a.sh_freememberacc {
background-color: #801939; background-color: #801939;
border-radius: 20px 20px 20px 20px; border-radius: 20px 20px 20px 20px;
} }
li.sh_freememberacc a:after, li a.sh_freememberacc:after { .sh_freememberacc a:after, li a.sh_freememberacc:after {
content: " Upgrade!"; content: " Upgrade!";
background-color: yellow; background-color: yellow;
color: red; color: red;
font-weight: bold; font-weight: bold;
font-size: 0.5em; font-size: 0.6em;
padding: 2px; padding: 2px;
border-radius: 10px; border-radius: 10px;
......
...@@ -184,6 +184,37 @@ if(!class_exists('SH_Shortcodes')) { ...@@ -184,6 +184,37 @@ if(!class_exists('SH_Shortcodes')) {
} }
wp_reset_postdata(); wp_reset_postdata();
$html .= "</ul></div>"; $html .= "</ul></div>";
/*
$html .= "<script>
window.SHM_stoplazy = false;
//$('body').on('click', function(event){
// // event.preventDefault();
// console.log('STOP CALLED');
// window.stop();
//});
//$(window).on('beforeunload', function() {
// console.log('BEFOREUNLOAD CALLED');
// //setInterval(window.stop, 200);
// window.stop();
// window.SHM_stoplazy = true;
//});
//$(window).on('lazybeforeunveil', function(event){
//console.log(event);
//if(window.SHM_stoplazy===true) {
// event.preventDefault();
// console.log('Event prevented');
// }
//});
//$(window).on('lazybeforesizes', function(event){
//console.log(event);
//});
</script>";
*/
return $html; return $html;
} }
......
...@@ -127,7 +127,7 @@ if(!class_exists('SH_VideoGallery')) { ...@@ -127,7 +127,7 @@ if(!class_exists('SH_VideoGallery')) {
$gif = $video->gif; $gif = $video->gif;
if(!$gif_preview) $gif_preview = $gif; if(!$gif_preview) $gif_preview = $gif;
if($gif_preview) $image .= "<img src='".plugin_dir_url(__DIR__)."/img/loading.gif' onmouseover='shmChangeGif(this)' data-src='$gif_preview' class='alignleft sexhack_thumb_hover' loading='lazy' />"; if($gif_preview) $image .= "<img src='".plugin_dir_url(__DIR__)."/img/loading.gif' onmouseover='shmChangeGif(this)' data-gsrc='$gif_preview' class='alignleft sexhack_thumb_hover' loading='lazy' />";
$html = '<li class="product type-product sexhack_thumbli">'; $html = '<li class="product type-product sexhack_thumbli">';
......
...@@ -211,7 +211,7 @@ function save_sexhack_video_forms( $post_id) ...@@ -211,7 +211,7 @@ function save_sexhack_video_forms( $post_id)
// **** HLS AND DOWNLOAD VIDEO PROCESSING **** // // **** HLS AND DOWNLOAD VIDEO PROCESSING **** //
// Differenciated content for access levels // Differenciated content for access levels
$public_exist=false; $public_exists=false;
$members_exists=false; $members_exists=false;
$selectedv=false; $selectedv=false;
foreach(array('public','members','premium') as $vt) foreach(array('public','members','premium') as $vt)
...@@ -243,7 +243,7 @@ function save_sexhack_video_forms( $post_id) ...@@ -243,7 +243,7 @@ function save_sexhack_video_forms( $post_id)
\DateTime::createFromFormat('H:i:s',$_POST['video_createPublicStart_'.$vt]) && \DateTime::createFromFormat('H:i:s',$_POST['video_createPublicStart_'.$vt]) &&
array_key_exists('video_createPublicDuration_'.$vt, $_POST) && array_key_exists('video_createPublicDuration_'.$vt, $_POST) &&
is_numeric($_POST['video_createPublicDuration_'.$vt]) && intval($_POST['video_createPublicDuration_'.$vt]) > 0 && is_numeric($_POST['video_createPublicDuration_'.$vt]) && intval($_POST['video_createPublicDuration_'.$vt]) > 0 &&
in_array($_POST['video_createPublic_'.$vt], array('Y','N')) && !$public_exists) in_array($_POST['video_createPublic_'.$vt], array('Y')) && !$public_exists)
{ {
$file=get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]); $file=get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]);
$start=$_POST['video_createPublicStart_'.$vt]; $start=$_POST['video_createPublicStart_'.$vt];
...@@ -259,8 +259,9 @@ function save_sexhack_video_forms( $post_id) ...@@ -259,8 +259,9 @@ function save_sexhack_video_forms( $post_id)
\DateTime::createFromFormat('H:i:s',$_POST['video_createPublicStart_'.$vt]) && \DateTime::createFromFormat('H:i:s',$_POST['video_createPublicStart_'.$vt]) &&
array_key_exists('video_createPublicDuration_'.$vt, $_POST) && array_key_exists('video_createPublicDuration_'.$vt, $_POST) &&
is_numeric($_POST['video_createPublicDuration_'.$vt]) && intval($_POST['video_createPublicDuration_'.$vt]) > 0 && is_numeric($_POST['video_createPublicDuration_'.$vt]) && intval($_POST['video_createPublicDuration_'.$vt]) > 0 &&
in_array($_POST['video_createPublic_'.$vt], array('Y','N')) && !$public_exists) in_array($_POST['video_createPublic_'.$vt], array('Y')) && !$public_exists)
{ {
$file=get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]); $file=get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]);
$start=$_POST['video_createPublicStart_'.$vt]; $start=$_POST['video_createPublicStart_'.$vt];
$duration=$_POST['video_createPublicDuration_'.$vt]; $duration=$_POST['video_createPublicDuration_'.$vt];
...@@ -272,7 +273,7 @@ function save_sexhack_video_forms( $post_id) ...@@ -272,7 +273,7 @@ function save_sexhack_video_forms( $post_id)
\DateTime::createFromFormat('H:i:s',$_POST['video_createMembersStart_'.$vt]) && \DateTime::createFromFormat('H:i:s',$_POST['video_createMembersStart_'.$vt]) &&
array_key_exists('video_createMembersDuration_'.$vt, $_POST) && array_key_exists('video_createMembersDuration_'.$vt, $_POST) &&
is_numeric($_POST['video_createMembersDuration_'.$vt]) && intval($_POST['video_createMembersDuration_'.$vt]) > 0 && is_numeric($_POST['video_createMembersDuration_'.$vt]) && intval($_POST['video_createMembersDuration_'.$vt]) > 0 &&
in_array($_POST['video_createMembers_'.$vt], array('Y','N')) && !$members_exists) in_array($_POST['video_createMembers_'.$vt], array('Y')) && !$members_exists)
{ {
$file=get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]); $file=get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]);
$start=$_POST['video_createMembersStart_'.$vt]; $start=$_POST['video_createMembersStart_'.$vt];
...@@ -293,7 +294,7 @@ function save_sexhack_video_forms( $post_id) ...@@ -293,7 +294,7 @@ function save_sexhack_video_forms( $post_id)
$video->__set('download_'.$vt, sanitize_text_field($_POST['video_download_'.$vt])); $video->__set('download_'.$vt, sanitize_text_field($_POST['video_download_'.$vt]));
} }
else if(!$admin && array_key_exists($vt.'_isdownload', $_POST) && else if(!$admin && array_key_exists($vt.'_isdownload', $_POST) &&
in_array($_POST[$vt.'_isdownload'], array('Y','N')) && array_key_exists('video_'.$vt, $_POST) && in_array($_POST[$vt.'_isdownload'], array('Y')) && array_key_exists('video_'.$vt, $_POST) &&
sanitize_text_field($_POST['video_'.$vt])) sanitize_text_field($_POST['video_'.$vt]))
{ {
//$video->__set('download_'.$vt, get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt])); //$video->__set('download_'.$vt, get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]));
......
function shmChangeGif(o){ function shmChangeGif(o){
//console.log(o); //console.log(o);
o.src = o.getAttribute('data-src'); o.src = o.getAttribute('data-gsrc');
console.log("loading "+o.src); console.log("loading "+o.src);
} }
......
...@@ -394,7 +394,7 @@ jQuery(function($) { ...@@ -394,7 +394,7 @@ jQuery(function($) {
formdata.append('video_createMembers_premium', $('input[name="video_createMembers_premium"]:checked').val()); formdata.append('video_createMembers_premium', $('input[name="video_createMembers_premium"]:checked').val());
formdata.append('video_createMembersStart_premium', $('input[name="video_createMembersStart_premium"]').val()); formdata.append('video_createMembersStart_premium', $('input[name="video_createMembersStart_premium"]').val());
formdata.append('video_createMembersDuration_premium', $('input[name="video_createMembersDuration_premium"]').val()); formdata.append('video_createMembersDuration_premium', $('input[name="video_createMembersDuration_premium"]').val());
formdata.append('video_createPublic_premium ', $('input[name="video_createPublic_premium"]:checked').val()); formdata.append('video_createPublic_premium', $('input[name="video_createPublic_premium"]:checked').val());
formdata.append('video_createPublicStart_premium', $('input[name="video_createPublicStart_premium"]').val()); formdata.append('video_createPublicStart_premium', $('input[name="video_createPublicStart_premium"]').val());
formdata.append('video_createPublicDuration_premium', $('input[name="video_createPublicDuration_premium"]').val()); formdata.append('video_createPublicDuration_premium', $('input[name="video_createPublicDuration_premium"]').val());
formdata.append('video_createPublic_members', $('input[name="video_createPublic_members"]:checked').val()); formdata.append('video_createPublic_members', $('input[name="video_createPublic_members"]:checked').val());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment