<?php $replies = Wo_CountCommentReplies($wo['comment']['id']);?>
<div class="comment comment-container" id="comment_<?php echo $wo['comment']['id'];?>" data-comment-id ="<?php echo $wo['comment']['id'];?>">
   <a class="<?php echo Wo_RightToLeft('pull-left'); ?>" href="<?php echo $wo['comment']['publisher']['url']?>">
      <img class="avatar <?php echo Wo_RightToLeft('pull-left'); ?>" src="<?php echo $wo['comment']['publisher']['avatar']?>" alt="avatar">
   </a>
   <div class="comment-body">
      <div class="comment-heading">
         <span class="user-popover" data-id="<?php echo $wo['comment']['publisher']['id'];?>" data-type="<?php echo $wo['comment']['publisher']['type'];?>">
            <a href="<?php echo $wo['comment']['publisher']['url']?>">
               <h4 class="user">
               <?php echo $wo['comment']['publisher']['name']?>
               </h4>
            </a>
         </span>
         <?php  if($wo['comment']['publisher']['verified'] == 1) {   ?>
         <span class="verified-color" data-toggle="tooltip" title="<?php echo $wo['lang']['verified_user'];?>"><i class="fa fa-check-circle"></i></span>
         <?php } ?>
         <div class="<?php echo Wo_RightToLeft('pull-right');?> comment-options">
            <?php if ($wo['comment']['onwer'] === true) { ?>
            <span class="pointer comment-icons" id="editComment" onclick="Wo_OpenCommentEditBox(<?php echo $wo['comment']['id']?>);">
               <i class="fa fa-pencil progress-icon" data-icon="pencil"></i>
            </span>
            <?php } ?>
            <?php if ($wo['comment']['post_onwer'] === true|| $wo['comment']['onwer'] === true) {?>
            <span class="pointer" id="deleteComment" onclick="Wo_DeleteComment(<?php echo $wo['comment']['id']?>);">
               <i class="fa fa-trash-o progress-icon" data-icon="trash-o"></i>
            </span>
            <?php } ?>
         </div>
         <span class="time ajax-time" title="<?php echo date('c',$wo['comment']['time']);?>"><?php echo $wo['comment']['time']?></span>
         <div class="comment-text"><?php echo $wo['comment']['text']?></div>
         
         <div class="clear"></div>
      </div>
      <span class="comment-options">
         <span class="comment-icons">
            <span class="pointer" id="LikeComment" onclick="Wo_RegisterCommentLike(<?php echo $wo['comment']['id']; ?>);">
               <?php if($wo['comment']['is_comment_liked'] !== true) { ?>
               <i class="fa fa-thumbs-up progress-icon" data-icon="thumbs-up"></i>
               <?php } else { ?>
               <i class="fa fa-thumbs-up progress-icon active-like" data-icon="thumbs-up"></i>
               <?php } ?>
            </span>
            <span id="comment-likes">
               <?php echo $wo['comment']['comment_likes'];?>
            </span> ·
         </span>
         <span class="pointer" id="WonderComment" onclick="Wo_RegisterCommentWonder(<?php echo $wo['comment']['id']; ?>);">
            <?php if($wo['comment']['is_comment_wondered'] !== true) { ?>
            <i class="fa fa-<?php echo $wo['second_post_button_icon'];?> progress-icon" data-icon="<?php echo $wo['second_post_button_icon'];?>"></i>
            <?php } else {  ?>
            <i class="fa fa-<?php echo $wo['second_post_button_icon'];?> progress-icon active-wonder" data-icon="<?php echo $wo['second_post_button_icon'];?>"></i>
            <?php } ?>
         </span>
         <span id="comment-wonders">
            <?php echo $wo['comment']['comment_wonders'];?>
         </span>
         <?php if ($replies == 0) { ?>
         ·
         <span class="pointer" id="ReplyComment" onclick="Wo_OpenReplyBox(<?php echo $wo['comment']['id']; ?>);">
            <i class="fa fa-comment progress-icon" data-icon="comment"></i>
         </span>
         <span id="comment-replies">
            <?php echo $replies;?>
         </span>
         <?php } ?>
      </span>
      <div class="comment-edit">
         <input type="text" class="form-control" value="<?php echo $wo['comment']['Orginaltext']?>" onkeyup="Wo_EditComment(this.value,<?php echo $wo['comment']['id']?>, event)" placeholder="Edit Comment" dir="auto">
      </div>
      <div class="comment-replies">
         <div class="comment-replies-text">
            <div class="reply-container"></div>
         </div>
         <?php if ($replies > 0) { ?>
         <div class="view-more-replies" onclick="Wo_ViewMoreReplies(<?php echo $wo['comment']['id'];?>);">
            <i class="fa fa-share fa-fw"></i> <?php echo $replies;?> <?php echo $wo['lang']['replies']?>
         </div>
         <?php } ?>
         <div class="comment-reply">
            <input type="text" class="form-control textarea" onkeyup="Wo_RegisterReply(this.value,<?php echo $wo['comment']['id']; ?>,<?php echo $wo['story']['publisher']['user_id']; ?>, event, <?php echo (!empty($wo['story']['publisher']['page_id'])) ? $wo['story']['publisher']['page_id'] : '0'; ?>)" placeholder="<?php echo $wo['lang']['reply_to_comment'];?>" dir="auto">
            <div id="hidden_inputbox_comment_reply"></div>
         </div>
      </div>
   </div>
   <?php echo Wo_LoadPage('modals/delete-comment');?>
   <script>
   $(function () {
   $("#comment_<?php echo $wo['comment']['id'];?> .comment-text").readmore({
   speed: 75,
   moreLink: '<a href="#" class="hash font-13"><?php echo $wo["lang"]["read_more"];?></a>',
   lessLink: '<a href="#" class="hash font-13"><?php echo $wo["lang"]["read_less"];?></a>',
   });
   $("#comment_<?php echo $wo['comment']['id']; ?> .comment-reply input").triggeredAutocomplete({
   hidden: '#hidden_inputbox_comment_reply',
   source: Wo_Ajax_Requests_File() + "?f=mention",
   trigger: "@"
   });
   });
   </script>
</div>