PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/productjuly1video/champdoms.click/themes/youplay/layout/watch/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/productjuly1video/champdoms.click/themes/youplay/layout/watch/video-comments.html

<?php if ($pt->config->comment_system == 'default' || $pt->config->comment_system == 'both') { ?>
    <div class="comments-content content pt_shadow pt_video_comments">
        <div class="comments-header">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-message-circle"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg> {{COUNT_COMMENTS}} {{LANG comments}}
            <span class="dropdown sort-comments-dropdown pull-right">
				<span class="dropdown-toggle pointer" type="button" data-toggle="dropdown">
					<i class="material-icons">sort</i> {{LANG sort_by}}
				</span>
				<ul class="dropdown-menu">
          
					<li class="sort-comments" id="1">
						<a href="javascript:void(0);">{{LANG top_commnets}}</a>
					</li>
					<li class="sort-comments" id="2">
						<a href="javascript:void(0);">{{LANG last_commnets}}</a>
					</li>
				</ul>
            </span>
        </div>
        <?php if (($pt->config->sell_videos_system == 'on' && $pt->get_video->sell_video > 0 && $pt->is_paid > 0) || $pt->get_video->sell_video == 0 || ($pt->config->sell_videos_system == 'on' && $pt->get_video->sell_video > 0 && $pt->get_video->is_owner)) {
          if ($pt->get_video->sell_video == 0 || $pt->get_video->is_owner || ($pt->get_video->sell_video > 0 && $pt->is_paid > 0)) { ?>
		<div class="w100 pt_blogcomm_combo yp_video_comment">
			<?php if (IS_LOGGED): ?>
			<img class="avatar" src="{{ME avatar}}" alt="{{ME name}} avatar" />
			<?php endif; ?>
			<textarea name="comment" rows="1" class="form-control jTextarea" id="comment-textarea" placeholder="{{LANG write_your_comment}}"></textarea>

			<button class="btn btn-main" onclick="PT_PostComment(this)">{{LANG publish}}</button>
		</div>
     <?php } } ?>
        <div class="comment-button">
            <hr>
            <div class="user-comments" id="video-pinned-comments">
				<div id="pinned-comment">
					{{PINNED_COMMENTS}}
				</div>
            </div>
        </div>
        <div class="comments-loading hidden">
			<i class="fa fa-circle-o-notch spin"></i>
        </div>
        <?php if ($pt->config->live_video != 1 || ($pt->config->live_video == 1 && !$pt->get_video->is_still_live) ) { ?>
        <div class="user-comments" id="video-user-comments">
          {{COMMENTS}}
        </div>
        <?php } ?>
        
        <?php if ($pt->count_comments > 0): ?>
            <div class="watch-video-show-more comments-load">
              {{LANG show_more}}
            </div>
        <?php endif; ?>
    </div>
<?php } ?>
<?php if ($pt->config->comment_system == 'fb' || $pt->config->comment_system == 'both') { ?>
    <div class="content">
        <div class="comments-header">
            {{LANG fb_comments}}
        </div>
        <div class="comment-box">
            <div class="fb-comments" data-href="{{URL}}" data-numposts="5" width="100%"></div>
        </div>
    </div>
<?php } ?>
<input type="hidden" id="video-id" value="{{VIDEO_ID}}">

<script>
jQuery(document).ready(function($) {

    var sort_comments_by = 2;

    $("li.sort-comments").click(function(event) {
      sort_comments_by = $(this).attr('id');
      var video_id     = $('#video-id').val();
      var data_obj     = {
        video_id:video_id,
        sort_by:sort_comments_by
      };

      $('#video-user-comments').empty();
      $(".comments-loading").removeClass('hidden');

      $.post('{{LINK aj/sort-comments}}',data_obj, function(data, textStatus, xhr) {
        if (data.status == 200) {
          PT_Delay(function(){
            $(".comments-loading").addClass('hidden');
            $('#video-user-comments').html(data.comments);
          },200);
        }
        else{
          PT_Delay(function(){
            $(".comments-loading").addClass('hidden');
          },200);
        }
      }); 

    });

    $.fn.scrollTo = function (speed) {
      if (typeof(speed) === 'undefined')
          speed = 500;

      $('html, body').animate({
          scrollTop: ($(this).offset().top - 100)
      }, speed);

      return $(this);
    };

    <?php if (!empty($_GET['cl']) && is_numeric($_GET['cl'])): ?>
      if ($('#comment-<?php echo($_GET['cl']); ?>').length) {
        var comment = $('#comment-<?php echo($_GET['cl']); ?>');
        comment.scrollTo().find('p.comment-text').addClass('active');
        PT_Delay(function(){
          comment.find('p.comment-text').removeClass('active')
        },2000);
      }
      else{
        $('#video-user-comments').scrollTo();
      }
    <?php elseif(!empty($_GET['rl']) && is_numeric($_GET['rl'])): ?>
      if ($('#reply-<?php echo($_GET['rl']); ?>').length) {
        var reply  = $('#reply-<?php echo($_GET['rl']); ?>');
        reply.scrollTo().find('p.reply-text').addClass('active');
        PT_Delay(function(){
          reply.find('p.reply-text').removeClass('active');
        },2000);
      }
      else{
        $('#video-user-comments').scrollTo();
      }
    <?php endif; ?>

    $('#comment-textarea').on('click', function(event) {
      event.preventDefault();
      var logged = $('#main-container').attr('data-logged');
      if (!logged) {
        window.location.href = "{{LINK login?to=<?php echo $pt->page_url_;?>}}";
        return false;
      }
      $(this).css('border', '1px solid #888');
    });

    $('.comments-load').on('click', function(event) {
      event.preventDefault();
      var last_id  = $('.main-comment:last').attr('data-id');
      var video_id = $('#video-id').val();
      var data_obj = {
        last_id: last_id,
        video_id:video_id,
        sort_by:sort_comments_by
      };

      if (sort_comments_by == 1) {
        var comment_ids      = [];
        $('.main-comment').each(function(index, el) {
          comment_ids.push($(el).attr('data-id'));
        });

        data_obj['comments'] = comment_ids.join()      
      }

      $.post('{{LINK aj/load-more-comments}}',data_obj, function(data, textStatus, xhr) {
        if (data.status == 200) {
          $('#video-user-comments').append(data.comments);
        } 

        else {
          $('.comments-load').text(data.message);
        }
      });      
   });
});

function PT_PostComment(button) {
   var text = $('#comment-textarea').val();
   if (!text) {
      return false;
   }
   var video_id = $('#video-id').val();
   if (!video_id) {
      return false;
   }
   if ($('#live_post_comments_'+video_id+' .live_comments').length >= 4) {
      $('#live_post_comments_'+video_id+' .live_comments').first().remove();
    }
      $('#live_post_comments_'+video_id).append('<div class="main-comment live_comments" live_comment_id=""><div class="main-comment-data-sp"><div class="user-avatar pull-left"><img src="{{ME avatar}}" alt="{{ME name}}"></div><div class="user-name"><a href="{{ME url}}" data-load="?link1=timeline&id={{ME username}}">{{ME name}}</a><?php if ($pt->user->verified == 1): ?><i class="fa fa-check-circle fa-fw verified"></i><?php endif; ?></div><div class="user-comment"><p class="comment-text">'+text+'</p></div><div class="clear"></div></div><div class="clear"></div></div>');
   $(button).attr('disabled', true);
   $.post('{{LINK aj/add-comment}}', {video_id: video_id, text: text}, function(data, textStatus, xhr) {
      if (data.status == 200) {
         if ($('.no-comments-found').length > 0) {
            $('.no-comments-found').remove();
         }
         $('#comment-textarea').val('').css('height', '49px');;
         $('#video-user-comments').prepend(data.comment);
      }
      $(button).attr('disabled', false);
   });
}

function PT_DeleteComment(id) {
  if (!id) { return false; }
  if (!confirm('{{LANG delete_confirmation}}')) { return false; }
  $('#comment-' + id).slideUp('fast');
  $.post('{{LINK aj/delete-comment}}', {id: id});
}

function PT_PinComment(id,pin){
  if (!id) { return false; }
  let pinned_comments = $('#pinned-comment');

  if (pin) {
    $("#comment-" + id).slideUp(200,function(){
		Snackbar.show({text: '{{LANG comment_pinned}}'});
    })
  }
  else{
    pinned_comments.empty();
	Snackbar.show({text: '{{LANG comment_unpinned}}'});
  } 
  
  $.post('{{LINK aj/pin-comment}}', {id: id},function(data){
    if (data.status == 200) {

      $("#comment-" + id).slideUp(100,function(){
        $(this).remove();
        pinned_comments.scrollTo();
      });

      pinned_comments.html(data.html);
    }

    else if(data.status == 304){
      $("#video-user-comments").append(data.html);
    } 
  });
}
</script>