Fix warnings

parent 4ee2012f
...@@ -40,6 +40,8 @@ ul.products li.sexhack_thumbli { ...@@ -40,6 +40,8 @@ ul.products li.sexhack_thumbli {
} }
.sexhack_vtag { .sexhack_vtag {
position:relative; position:relative;
float:left; float:left;
...@@ -53,15 +55,29 @@ ul.products li.sexhack_thumbli { ...@@ -53,15 +55,29 @@ ul.products li.sexhack_thumbli {
.sexhack_vtag:hover { .sexhack_vtag:hover {
z-index:100; z-index:100;
} }
.sexhack_vtag_duration {
background-color:#141a1f;
opacity: 0.8;
float: right;
top:-25px;
right: 12px;
font-size: 12px;
}
.sexhack_download { .sexhack_download {
position: absolute; position: absolute;
top:1px; top:-14px;
left:-1px; left:-1px;
z-index:100; z-index:100;
border-bottom:-20px; border-bottom:-20px;
background-color:#4a235a; background-color:#4a235a;
} }
.sexhack_gallery {
margin-top: 15px;
}
.sexhack_VR { .sexhack_VR {
position: absolute; position: absolute;
top:1px; top:1px;
...@@ -112,6 +128,11 @@ ul.products li.sexhack_thumbli { ...@@ -112,6 +128,11 @@ ul.products li.sexhack_thumbli {
width: 100%; width: 100%;
} }
.sexhack_video_title {
font-weight: 600;
font-size: 1.2em;
}
.sexhack-tabs { .sexhack-tabs {
margin-left: 10px; margin-left: 10px;
} }
......
...@@ -86,6 +86,8 @@ if(!class_exists('SH_Admin')) { ...@@ -86,6 +86,8 @@ if(!class_exists('SH_Admin')) {
register_setting('sexhackme-gallery-settings', 'sexhack_video404_page'); register_setting('sexhackme-gallery-settings', 'sexhack_video404_page');
register_setting('sexhackme-gallery-settings', 'sexhack_shmdown'); register_setting('sexhackme-gallery-settings', 'sexhack_shmdown');
register_setting('sexhackme-gallery-settings', 'sexhack_shmdown_uri'); 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_tmp_path');
register_setting('sexhackme-gallery-settings', 'sexhack_video_flat_path'); register_setting('sexhackme-gallery-settings', 'sexhack_video_flat_path');
register_setting('sexhackme-gallery-settings', 'sexhack_video_vr_path'); register_setting('sexhackme-gallery-settings', 'sexhack_video_vr_path');
......
...@@ -28,6 +28,8 @@ if(!class_exists('SH_PMS_Support')) { ...@@ -28,6 +28,8 @@ if(!class_exists('SH_PMS_Support')) {
class SH_PMS_Support class SH_PMS_Support
{ {
public $plans;
public function __construct() public function __construct()
{ {
$this->plans = false; $this->plans = false;
......
...@@ -150,7 +150,8 @@ if(!class_exists('SH_StoreFront')) { ...@@ -150,7 +150,8 @@ if(!class_exists('SH_StoreFront')) {
public static function add_handheld_cart() public static function add_handheld_cart()
{ {
// XXX set an option for the account and login page? // 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> <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 <?php
......
...@@ -31,6 +31,7 @@ if(!class_exists('SH_VideoGallery')) { ...@@ -31,6 +31,7 @@ if(!class_exists('SH_VideoGallery')) {
class SH_VideoGallery class SH_VideoGallery
{ {
public $videolist;
public function __construct() public function __construct()
{ {
...@@ -146,10 +147,20 @@ if(!class_exists('SH_VideoGallery')) { ...@@ -146,10 +147,20 @@ if(!class_exists('SH_VideoGallery')) {
else $vtags[] = '<label class="sexhack_vtag sexhack_premium" style="*LEFT*">premium</label>'; 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>'; 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\">"; $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>"; $html .= "<div class='sexhack_thumb_cont'>".$image."</div>";
foreach($vtags as $vid => $vtag) foreach($vtags as $vid => $vtag)
......
...@@ -715,6 +715,13 @@ if(!class_exists('SH_WooCommerce_Chaturbate_Payments')) { ...@@ -715,6 +715,13 @@ if(!class_exists('SH_WooCommerce_Chaturbate_Payments')) {
function chaturbate_payment_init() { function chaturbate_payment_init() {
class SH_WooCommerce_Chaturbate_Payments extends \WC_Payment_Gateway { 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 // Constructor for initializing the payment gateway
public function __construct() { public function __construct() {
$this->id = 'shchaturbate'; $this->id = 'shchaturbate';
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* along with SexHackMe Wordpress Plugin. If not, see <https://www.gnu.org/licenses/>. * along with SexHackMe Wordpress Plugin. If not, see <https://www.gnu.org/licenses/>.
*/ */
//var vtag = document.getElementById('vtag');
function SexHLSPlayer(url, vuid, autoplay=false){ function SexHLSPlayer(url, vuid, autoplay=false){
var vtag = document.getElementById(vuid); var vtag = document.getElementById(vuid);
......
...@@ -83,6 +83,18 @@ if ( ! defined( 'ABSPATH' ) ) exit; ...@@ -83,6 +83,18 @@ if ( ! defined( 'ABSPATH' ) ) exit;
<input type='text' name='sexhack_shmdown_uri' value='<?php echo get_option('sexhack_shmdown_uri', ''); ?>'> <input type='text' name='sexhack_shmdown_uri' value='<?php echo get_option('sexhack_shmdown_uri', ''); ?>'>
</td> </td>
</tr> </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> <tr>
<td> <td>
<label>Video Upload TMP path</label> <label>Video Upload TMP path</label>
......
...@@ -50,8 +50,26 @@ get_header(); ?> ...@@ -50,8 +50,26 @@ get_header(); ?>
<?php <?php
//the_archive_title( '<h1 class="page-title">', '</h1>' ); //the_archive_title( '<h1 class="page-title">', '</h1>' );
//the_archive_description( '<div class="taxonomy-description">', '</div>' ); // XXX Check it? what it does //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 --> </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 <?php
...@@ -140,6 +158,10 @@ get_header(); ?> ...@@ -140,6 +158,10 @@ get_header(); ?>
<?php <?php
$filterurl=false; $filterurl=false;
if(get_option('sexhack_shmdown', false)) $filterurl=get_option('sexhack_shmdown_uri', 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)) if(in_array($tab, $avail))
{ {
switch($tab) switch($tab)
...@@ -149,13 +171,18 @@ get_header(); ?> ...@@ -149,13 +171,18 @@ get_header(); ?>
if(user_has_member_access() || $video->user_bought_video()) if(user_has_member_access() || $video->user_bought_video())
{ {
if($filterurl && $hls_members && $video->video_type=="VR" ) 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."\"]" ); 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" ) else if($hls_members && $video->video_type=="VR" )
echo do_shortcode( "[sexvideo url=\"".$hls_members."\" posters=\"".$thumb."\"]" ); echo do_shortcode( "[sexvideo url=\"".$hls_members."\" posters=\"".$thumb."\"]" );
else if($filterurl && $hls_members) 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."\"]" ); /* XXX */
else if($hls_members) 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."\"]" ); 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 echo "<h3 class='sexhack-videonotify'>SOMETHING WENT BADLY WRONG. I CAN'T FIND THE VIDEO</h3>";
} }
else else
...@@ -249,7 +276,20 @@ get_header(); ?> ...@@ -249,7 +276,20 @@ get_header(); ?>
if($pcontent!='') { ?> if($pcontent!='') { ?>
<p><?php echo $pcontent; ?></p> <p><?php echo $pcontent; ?></p>
<?php } ?> <?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> <hr>
<?php <?php
echo $htmltags; echo $htmltags;
?> ?>
......
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