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
6417b074
Commit
6417b074
authored
Dec 22, 2024
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings
parent
4ee2012f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
105 additions
and
9 deletions
+105
-9
sexhackme_gallery.css
css/sexhackme_gallery.css
+22
-1
class-admin.php
includes/class-admin.php
+2
-0
class-paid-member-subscriptions-integration.php
includes/class-paid-member-subscriptions-integration.php
+2
-0
class-storefront.php
includes/class-storefront.php
+2
-1
class-videogallery.php
includes/class-videogallery.php
+13
-2
class-woocommerce-support.php
includes/class-woocommerce-support.php
+7
-0
sexhls.js
js/sexhls.js
+1
-1
gallery.php
templates/admin/gallery.php
+12
-0
video.php
templates/video.php
+44
-4
No files found.
css/sexhackme_gallery.css
View file @
6417b074
...
...
@@ -40,6 +40,8 @@ ul.products li.sexhack_thumbli {
}
.sexhack_vtag
{
position
:
relative
;
float
:
left
;
...
...
@@ -53,15 +55,29 @@ ul.products li.sexhack_thumbli {
.sexhack_vtag
:hover
{
z-index
:
100
;
}
.sexhack_vtag_duration
{
background-color
:
#141a1f
;
opacity
:
0.8
;
float
:
right
;
top
:
-25px
;
right
:
12px
;
font-size
:
12px
;
}
.sexhack_download
{
position
:
absolute
;
top
:
1
px
;
top
:
-14
px
;
left
:
-1px
;
z-index
:
100
;
border-bottom
:
-20px
;
background-color
:
#4a235a
;
}
.sexhack_gallery
{
margin-top
:
15px
;
}
.sexhack_VR
{
position
:
absolute
;
top
:
1px
;
...
...
@@ -112,6 +128,11 @@ ul.products li.sexhack_thumbli {
width
:
100%
;
}
.sexhack_video_title
{
font-weight
:
600
;
font-size
:
1.2em
;
}
.sexhack-tabs
{
margin-left
:
10px
;
}
...
...
includes/class-admin.php
View file @
6417b074
...
...
@@ -86,6 +86,8 @@ if(!class_exists('SH_Admin')) {
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_video404_page'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_shmdown'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_shmdown_uri'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_random_video'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_random_video_uri'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_video_tmp_path'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_video_flat_path'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_video_vr_path'
);
...
...
includes/class-paid-member-subscriptions-integration.php
View file @
6417b074
...
...
@@ -28,6 +28,8 @@ if(!class_exists('SH_PMS_Support')) {
class
SH_PMS_Support
{
public
$plans
;
public
function
__construct
()
{
$this
->
plans
=
false
;
...
...
includes/class-storefront.php
View file @
6417b074
...
...
@@ -150,7 +150,8 @@ if(!class_exists('SH_StoreFront')) {
public
static
function
add_handheld_cart
()
{
// XXX set an option for the account and login page?
$url
=
WC
()
->
cart
->
get_cart_url
();
//$url=WC()->cart->get_cart_url();
$url
=
wc_get_cart_url
();
?>
<a
href=
"
<?php
echo
$url
;
?>
"
><i
class=
"fa fa-shopping-cart fa-2x"
style=
"margin-left:10px;position:relative;display:block;float:left;color:white;"
aria-hidden=
"true"
></i></a>
<?php
...
...
includes/class-videogallery.php
View file @
6417b074
...
...
@@ -31,6 +31,7 @@ if(!class_exists('SH_VideoGallery')) {
class
SH_VideoGallery
{
public
$videolist
;
public
function
__construct
()
{
...
...
@@ -146,12 +147,22 @@ if(!class_exists('SH_VideoGallery')) {
else
$vtags
[]
=
'<label class="sexhack_vtag sexhack_premium" style="*LEFT*">premium</label>'
;
}
if
(
$video
->
has_downloads
())
$html
.=
'<label class="sexhack_vtag sexhack_download"">download
</label>'
;
//if($video->has_downloads()) $html .= '<label class="sexhack_vtag sexhack_download"">download and PPV $'.$video->price.'
</label>';
if
(
$video
->
video_type
==
'VR'
)
$html
.=
'<label class="sexhack_vtag sexhack_VR"">VR/3D</label>'
;
$duration
=
false
;
if
(
$hls_premium
)
$duration
=
$video
->
duration_premium
;
else
if
(
$hls_member
)
$duration
=
$video
->
duration_members
;
else
if
(
$hls_public
)
$duration
=
$video
->
duration_public
;
if
(
$duration
)
{
$vtags
[]
=
'<label class="sexhack_vtag sexhack_vtag_duration">'
.
$duration
.
'</label>'
;
}
$html
.=
"<a href=
\"
$vurl
\"
class=
\"
woocommerce-LoopProduct-link woocommerce-loop-product__link
\"
>"
;
if
(
$video
->
has_downloads
())
$html
.=
'<label class="sexhack_vtag sexhack_download"">download and PPV $'
.
$video
->
price
.
'</label>'
;
$html
.=
"<div class='sexhack_thumb_cont'>"
.
$image
.
"</div>"
;
foreach
(
$vtags
as
$vid
=>
$vtag
)
{
$left
=
intval
(
$vid
)
*
12
;
...
...
includes/class-woocommerce-support.php
View file @
6417b074
...
...
@@ -715,6 +715,13 @@ if(!class_exists('SH_WooCommerce_Chaturbate_Payments')) {
function
chaturbate_payment_init
()
{
class
SH_WooCommerce_Chaturbate_Payments
extends
\WC_Payment_Gateway
{
public
$uuid_prefix
;
public
$cb_model
;
public
$cb_change
;
public
$instructions
;
public
$api_passkey
;
// Constructor for initializing the payment gateway
public
function
__construct
()
{
$this
->
id
=
'shchaturbate'
;
...
...
js/sexhls.js
View file @
6417b074
...
...
@@ -18,7 +18,7 @@
* along with SexHackMe Wordpress Plugin. If not, see <https://www.gnu.org/licenses/>.
*/
//var vtag = document.getElementById('vtag');
function
SexHLSPlayer
(
url
,
vuid
,
autoplay
=
false
){
var
vtag
=
document
.
getElementById
(
vuid
);
...
...
templates/admin/gallery.php
View file @
6417b074
...
...
@@ -83,6 +83,18 @@ if ( ! defined( 'ABSPATH' ) ) exit;
<input
type=
'text'
name=
'sexhack_shmdown_uri'
value=
'
<?php
echo
get_option
(
'sexhack_shmdown_uri'
,
''
);
?>
'
>
</td>
</tr>
<tr>
<td>
<label>
Randomize HLS URL?
</label>
<input
type=
"checkbox"
name=
"sexhack_random_video"
value=
'1'
<?php
if
(
get_option
(
'sexhack_random_video'
,
false
))
echo
"checked"
;
?>
>
</td>
<td>
<label>
base URL for randomize
</label>
<input
type=
'text'
name=
'sexhack_random_video_uri'
value=
'
<?php
echo
get_option
(
'sexhack_random_video_uri'
,
''
);
?>
'
>
</td>
</tr>
<tr>
<td>
<label>
Video Upload TMP path
</label>
...
...
templates/video.php
View file @
6417b074
...
...
@@ -50,8 +50,26 @@ get_header(); ?>
<?php
//the_archive_title( '<h1 class="page-title">', '</h1>' );
//the_archive_description( '<div class="taxonomy-description">', '</div>' ); // XXX Check it? what it does
?>
$wp_c
=
""
;
$wp_n
=
""
;
foreach
(
$_COOKIE
as
$cn
=>
$cv
)
{
if
(
str_starts_with
(
$cn
,
'wordpress_logged_in_'
))
{
$wp_c
=
$cv
;
$wp_n
=
$cn
;
}
}
?>
</header>
<!-- .page-header -->
<?php
if
(
get_option
(
'sexhack_random_video'
,
false
))
{
?>
<script
language=
javascript
>
XMLHttpRequest
.
prototype
.
origOpen
=
XMLHttpRequest
.
prototype
.
open
;
XMLHttpRequest
.
prototype
.
open
=
function
()
{
this
.
origOpen
.
apply
(
this
,
arguments
);
this
.
setRequestHeader
(
'X-SHM-WPc'
,
'
<?php
echo
"
$wp_c
"
;
?>
'
);
this
.
setRequestHeader
(
'X-SHM-WPn'
,
'
<?php
echo
"
$wp_n
"
;
?>
'
);
}
</script>
<?php
}
?>
<?php
...
...
@@ -140,6 +158,10 @@ get_header(); ?>
<?php
$filterurl
=
false
;
if
(
get_option
(
'sexhack_shmdown'
,
false
))
$filterurl
=
get_option
(
'sexhack_shmdown_uri'
,
false
);
$randuri
=
""
;
if
(
get_option
(
'sexhack_random_video'
,
false
)
&&
strlen
(
get_option
(
'sexhack_random_video_uri'
))
>
0
)
$randuri
=
"https://"
.
uniqid
(
'SHM'
)
.
"."
.
get_option
(
'sexhack_random_video_uri'
);
//print_r($_COOKIE);
//print_r("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
if
(
in_array
(
$tab
,
$avail
))
{
switch
(
$tab
)
...
...
@@ -149,13 +171,18 @@ get_header(); ?>
if
(
user_has_member_access
()
||
$video
->
user_bought_video
())
{
if
(
$filterurl
&&
$hls_members
&&
$video
->
video_type
==
"VR"
)
{
echo
do_shortcode
(
"[sexvideo url=
\"
"
.
wp_nonce_url
(
$filterurl
.
$sh_video
.
"/members/"
.
basename
(
$hls_members
),
'shm_members_video-'
.
$video
->
id
)
.
"
\"
posters=
\"
"
.
$thumb
.
"
\"
]"
);
}
else
if
(
$hls_members
&&
$video
->
video_type
==
"VR"
)
echo
do_shortcode
(
"[sexvideo url=
\"
"
.
$hls_members
.
"
\"
posters=
\"
"
.
$thumb
.
"
\"
]"
);
else
if
(
$filterurl
&&
$hls_members
)
echo
do_shortcode
(
"[sexhls url=
\"
"
.
wp_nonce_url
(
$filterurl
.
$sh_video
.
"/members/"
.
basename
(
$hls_members
),
'shm_members_video-'
.
$video
->
id
)
.
"
\"
posters=
\"
"
.
$thumb
.
"
\"
]"
);
else
if
(
$hls_members
)
else
if
(
$filterurl
&&
$hls_members
)
{
/* XXX */
echo
do_shortcode
(
"[sexhls url=
\"
"
.
$randuri
.
wp_nonce_url
(
$filterurl
.
$sh_video
.
"/members/"
.
basename
(
$hls_members
),
'shm_members_video-'
.
$video
->
id
)
.
"
\"
posters=
\"
"
.
$thumb
.
"
\"
]"
);
}
else
if
(
$hls_members
)
{
echo
do_shortcode
(
"[sexhls url=
\"
"
.
$hls_members
.
"
\"
posters=
\"
"
.
$thumb
.
"
\"
]"
);
}
else
echo
"<h3 class='sexhack-videonotify'>SOMETHING WENT BADLY WRONG. I CAN'T FIND THE VIDEO</h3>"
;
}
else
...
...
@@ -249,7 +276,20 @@ get_header(); ?>
if
(
$pcontent
!=
''
)
{
?>
<p>
<?php
echo
$pcontent
;
?>
</p>
<?php
}
?>
<div>
<?php
if
(
$hls_premium
)
{
echo
"<div><b>"
;
if
(
$premium_is_ppv
)
echo
"PPV"
;
else
echo
"Premium"
;
echo
" version lenght: </b>"
.
$video
->
duration_premium
.
"</div>"
;
}
if
(
$hls_members
)
echo
"<div><b>Member version lenght: </b>"
.
$video
->
duration_members
.
"</div>"
;
if
(
$hls_public
)
echo
"<div><b>Public version lenght: </b>"
.
$video
->
duration_public
.
"</div>"
;
?>
</div>
<hr>
<?php
echo
$htmltags
;
?>
...
...
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