Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WordPress_SexHackMe_Plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
WordPress_SexHackMe_Plugin
Commits
b5c7d0aa
Commit
b5c7d0aa
authored
Aug 06, 2024
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed upload video
parent
59e0f5e2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
14 deletions
+64
-14
sexhackme_header.css
css/sexhackme_header.css
+21
-3
class-shortcodes.php
includes/class-shortcodes.php
+31
-0
class-storefront.php
includes/class-storefront.php
+1
-1
class-videogallery.php
includes/class-videogallery.php
+1
-1
functions-forms-save.php
includes/functions-forms-save.php
+8
-7
sexhackme_gallery.js
js/sexhackme_gallery.js
+1
-1
new_video.php
templates/new_video.php
+1
-1
No files found.
css/sexhackme_header.css
View file @
b5c7d0aa
...
...
@@ -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
;
}
...
...
@@ -120,6 +121,7 @@ div.etn-single-event-media img.wp-post-image {
border
:
grey
1px
solid
;
}
li
.sh_signupmenu
a
,
li
a
.sh_signupmenu
{
background-color
:
#801939
;
border-radius
:
20px
20px
20px
20px
;
...
...
@@ -136,17 +138,33 @@ li.sh_signupmenu a:after, li a.sh_signupmenu:after {
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
{
background-color
:
#801939
;
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!"
;
background-color
:
yellow
;
color
:
red
;
font-weight
:
bold
;
font-size
:
0.
5
em
;
font-size
:
0.
6
em
;
padding
:
2px
;
border-radius
:
10px
;
...
...
includes/class-shortcodes.php
View file @
b5c7d0aa
...
...
@@ -184,6 +184,37 @@ if(!class_exists('SH_Shortcodes')) {
}
wp_reset_postdata
();
$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
;
}
...
...
includes/class-storefront.php
View file @
b5c7d0aa
...
...
@@ -113,7 +113,7 @@ if(!class_exists('SH_StoreFront')) {
<?php
}
else
if
(
is_user_logged_in
()
&&
!
user_is_premium
())
{
?>
<a
href=
"/account/"
>
My Account
</a>
<a
href=
"/account/"
>
My Account
</a>
<a
class=
"sh_freememberacc"
href=
"/product-category/subscriptions/"
>
Premium
</a>
<?php
}
else
if
(
is_user_logged_in
()
&&
user_is_premium
())
{
...
...
includes/class-videogallery.php
View file @
b5c7d0aa
...
...
@@ -127,7 +127,7 @@ if(!class_exists('SH_VideoGallery')) {
$gif
=
$video
->
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-
g
src='
$gif_preview
' class='alignleft sexhack_thumb_hover' loading='lazy' />"
;
$html
=
'<li class="product type-product sexhack_thumbli">'
;
...
...
includes/functions-forms-save.php
View file @
b5c7d0aa
...
...
@@ -211,7 +211,7 @@ function save_sexhack_video_forms( $post_id)
// **** HLS AND DOWNLOAD VIDEO PROCESSING **** //
// Differenciated content for access levels
$public_exist
=
false
;
$public_exist
s
=
false
;
$members_exists
=
false
;
$selectedv
=
false
;
foreach
(
array
(
'public'
,
'members'
,
'premium'
)
as
$vt
)
...
...
@@ -236,14 +236,14 @@ function save_sexhack_video_forms( $post_id)
sh_add_video_job
(
$video
->
id
,
'process_hls_'
.
$vt
,
get_option
(
'sexhack_video_tmp_path'
,
'/tmp'
)
.
"/"
.
sanitize_text_field
(
$_POST
[
'video_'
.
$vt
]));
if
(
$vt
==
'public'
)
$public_exists
=
true
;
if
(
$vt
==
'members'
)
{
{
$members_exists
=
true
;
if
(
array_key_exists
(
'video_createPublic_'
.
$vt
,
$_POST
)
&&
array_key_exists
(
'video_createPublicStart_'
.
$vt
,
$_POST
)
&&
\DateTime
::
createFromFormat
(
'H:i:s'
,
$_POST
[
'video_createPublicStart_'
.
$vt
])
&&
array_key_exists
(
'video_createPublicDuration_'
.
$vt
,
$_POST
)
&&
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
]);
$start
=
$_POST
[
'video_createPublicStart_'
.
$vt
];
...
...
@@ -253,14 +253,15 @@ function save_sexhack_video_forms( $post_id)
}
}
if
(
$vt
==
'premium'
)
{
{
if
(
array_key_exists
(
'video_createPublic_'
.
$vt
,
$_POST
)
&&
array_key_exists
(
'video_createPublicStart_'
.
$vt
,
$_POST
)
&&
\DateTime
::
createFromFormat
(
'H:i:s'
,
$_POST
[
'video_createPublicStart_'
.
$vt
])
&&
array_key_exists
(
'video_createPublicDuration_'
.
$vt
,
$_POST
)
&&
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
]);
$start
=
$_POST
[
'video_createPublicStart_'
.
$vt
];
$duration
=
$_POST
[
'video_createPublicDuration_'
.
$vt
];
...
...
@@ -272,7 +273,7 @@ function save_sexhack_video_forms( $post_id)
\DateTime
::
createFromFormat
(
'H:i:s'
,
$_POST
[
'video_createMembersStart_'
.
$vt
])
&&
array_key_exists
(
'video_createMembersDuration_'
.
$vt
,
$_POST
)
&&
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
]);
$start
=
$_POST
[
'video_createMembersStart_'
.
$vt
];
...
...
@@ -293,7 +294,7 @@ function save_sexhack_video_forms( $post_id)
$video
->
__set
(
'download_'
.
$vt
,
sanitize_text_field
(
$_POST
[
'video_download_'
.
$vt
]));
}
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
]))
{
//$video->__set('download_'.$vt, get_option('sexhack_video_tmp_path', '/tmp')."/".sanitize_text_field($_POST['video_'.$vt]));
...
...
js/sexhackme_gallery.js
View file @
b5c7d0aa
function
shmChangeGif
(
o
){
//console.log(o);
o
.
src
=
o
.
getAttribute
(
'data-src'
);
o
.
src
=
o
.
getAttribute
(
'data-
g
src'
);
console
.
log
(
"loading "
+
o
.
src
);
}
...
...
templates/new_video.php
View file @
b5c7d0aa
...
...
@@ -394,7 +394,7 @@ jQuery(function($) {
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_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_createPublicDuration_premium'
,
$
(
'input[name="video_createPublicDuration_premium"]'
).
val
());
formdata
.
append
(
'video_createPublic_members'
,
$
(
'input[name="video_createPublic_members"]:checked'
).
val
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment