<div class="timeline-posts content-shadow" data-post-id="<?php echo($post_data['post_id']) ?>">
<?php if ($post_data['boosted'] == 1 && $context['is_boosted'] == false) { ?>
<span class="promoted_post"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M5 8.999c0 2.318 1.138 4.371 2.879 5.646l.001.001c.569.416 1.201.749 1.881.979.017.006.034.013.051.019.316.104.643.185.977.243.062.011.124.02.186.028C11.311 15.966 11.65 16 11.999 16 12 16 12 16 12 16c0 0 0 0 0 0 .35 0 .69-.034 1.027-.084.061-.009.121-.018.182-.028.336-.059.664-.139.981-.243.015-.005.028-.011.042-.016C17 14.693 19 12.078 19 8.999 19 5.14 15.86 2 12 2S5 5.14 5 8.999zM12 4c2.756 0 5 2.242 5 4.999h-2C15 7.346 13.654 6 12 6V4zM7.521 16.795l0 5.205L12 20.5l4.479 1.5.001-5.205C15.158 17.557 13.632 18 12 18 10.369 18 8.841 17.557 7.521 16.795z"/></svg> Promoted</span>
<?php $context['is_boosted'] = true; } ?>
<div class="valign header">
<div class="valign publisher-name">
<a href="<?php echo(un2url($post_data['username'])) ?>" data-ajax="ajax_loading.php?app=profile&apph=profile&uname=<?php echo($post_data['username']) ?>">
<img src="<?php echo(media($post_data['avatar'])) ?>" class="img-circle" />
</a>
<div>
<p>
<a href="<?php echo(un2url($post_data['username'])) ?>" data-ajax="ajax_loading.php?app=profile&apph=profile&uname=<?php echo($post_data['username']) ?>">
<?php echo($post_data['username']) ?> <?php if ($post_data['is_verified'] > 0) { ?><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M23,12L20.56,9.22L20.9,5.54L17.29,4.72L15.4,1.54L12,3L8.6,1.54L6.71,4.72L3.1,5.53L3.44,9.21L1,12L3.44,14.78L3.1,18.47L6.71,19.29L8.6,22.47L12,21L15.4,22.46L17.29,19.28L20.9,18.46L20.56,14.78L23,12M10,17L6,13L7.41,11.59L10,14.17L16.59,7.58L18,9L10,17Z"></path></svg><?php } ?>
</a>
<?php if(IsSharedPost($post_data['post_id'])){
echo str_replace(array('}','{'),'',lang('share_post'));
}?>
</p>
<time class="time-ago" title="<?php echo(ToDate($post_data['time'])) ?>"><a href="<?php echo(pid2url($post_data['post_id'])) ?>" target="_blank"><?php echo(time2str($post_data['time'])); ?></a></time>
</div>
</div>
<div class="dropdown">
<span class="dropdown-toggle" data-toggle="dropdown"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z"/></svg></span>
<ul class="dropdown-menu pull-right">
<?php if ($post_data['is_owner'] == true) { ?>
<li onclick="delete_post(<?php echo $post_data['post_id']; ?>);"><a href="javascript:void(0);">{{LANG delete_post}}</a></li>
<li onclick="edit_post(<?php echo $post_data['post_id']; ?>);"><a href="javascript:void(0);">{{LANG edit_post}}</a></li>
<?php if ($post_data['user_data']['is_pro']) { ?>
<?php if ($post_data['boosted'] == 0) { ?>
<li onclick="pxp_boost_post(<?php echo $post_data['post_id']; ?>);"><a href="javascript:void(0);" id="boost_<?php echo $post_data['post_id']; ?>">{{LANG boost_post}}</a></li>
<?php }else{ ?>
<li onclick="pxp_boost_post(<?php echo $post_data['post_id']; ?>);"><a href="javascript:void(0);" id="boost_<?php echo $post_data['post_id']; ?>">{{LANG unboost_post}}</a></li>
<?php }} ?>
<?php } ?>
<?php if ($post_data['is_owner'] != true) { ?>
<li onclick="report_post(<?php echo $post_data['post_id']; ?>,this);">
<a href="javascript:void(0);"><?php if ($post_data['reported']) { ?>{{LANG cancel_report}}<?php } else{ ?>{{LANG report_post}}<?php } ?></a>
</li>
<?php } ?>
<li onclick="embed_post(<?php echo $post_data['post_id']; ?>,this);"><a href="javascript:void(0);">{{LANG embed}}</a></li>
<li><a href="<?php echo(pid2url($post_data['post_id'])) ?>" target="_blank">{{LANG go2post}}</a></li>
</ul>
</div>
</div>
<div class="post-images fluid lightgallery" data-lightgallery="<?php echo $post_data['post_id']; ?>">
<?php if (count($post_data['media_set']) > 1) { foreach ($post_data['media_set'] as $id => $file) { if ($id == 0) { ?>
<a href="<?php echo(media($file['file'])) ?>" class="lightgallery-item active" data-lightbox="group" style="background-image: url(<?php echo(media($file['file'])) ?>);">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M4,2C2.89,2 2,2.89 2,4V14H4V4H14V2H4M8,6C6.89,6 6,6.89 6,8V18H8V8H18V6H8M12,10C10.89,10 10,10.89 10,12V20C10,21.11 10.89,22 12,22H20C21.11,22 22,21.11 22,20V12C22,10.89 21.11,10 20,10H12Z" /></svg>
</a>
<?php } else { ?>
<a href="<?php echo(media($file['file'])) ?>" class="image-lightbox" data-lightbox="group"></a>
<?php } } } else{ foreach ($post_data['media_set'] as $id => $file) { ?>
<a data-sub-html="#image-caption-<?php echo $post_data['post_id']; ?>" href="<?php echo(media($file['file'])) ?>" class="image-lightbox" data-lightbox>
<img src="<?php echo(media($file['file'])) ?>" class="img-res">
</a>
<?php } } ?>
</div>
<?php
$shared_owner = GetSharedPostOwner($post_data['post_id']);
if(is_array($shared_owner) && !empty($shared_owner)){
?>
<div class="header pp_shared_post_author">
<div class="pp_shared_post_author_innr">
<div class="valign publisher-name">
<a href="<?php echo(un2url($shared_owner['username'])) ?>" data-ajax="ajax_loading.php?app=profile&apph=profile&uname=<?php echo($shared_owner['username']) ?>">
<img src="<?php echo(media($shared_owner['avatar'])) ?>" class="img-circle">
</a>
<div>
<p>
<a href="<?php echo(un2url($shared_owner['username'])) ?>" data-ajax="ajax_loading.php?app=profile&apph=profile&uname=<?php echo($shared_owner['username']) ?>"><?php echo($shared_owner['username']) ?></a>
</p>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="valign actions">
<div class="valign">
<span onclick="like_post(<?php echo $post_data['post_id']; ?>,this);" class="like-post <?php if($post_data['is_liked']){ ?>active<?php } ?>">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"></path></svg>
</span>
<div onclick="view_post_likes(<?php echo $post_data['post_id']; ?>);" title="{{LANG likes}}">
<span data-post-likes="<?php echo $post_data['post_id']; ?>"><?php echo $post_data['likes']; ?></span>
</div>
</div>
<div class="valign" onclick="toggle_post_comm(<?php echo $post_data['post_id']; ?>);" title="{{LANG comments}}">
<span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M5,5V7H19V5H5M5,9V11H13V9H5M5,13V15H15V13H5Z"></path></svg>
</span>
<div>
<span><?php echo $post_data['votes']; ?></span>
</div>
</div>
<div class="valign pst_sve">
<span class="save-post <?php if($post_data['is_saved']){ ?>active<?php } ?>" onclick="save_post(<?php echo $post_data['post_id']; ?>,this);">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M17,3H7A2,2 0 0,0 5,5V21L12,18L19,21V5C19,3.89 18.1,3 17,3Z"></path></svg>
</span>
</div>
<div class="valign pst_shr">
<span class="share-post" onclick="getShareModal(<?php echo $post_data['post_id']; ?>, this);">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21,12L14,5V9C7,10 4,15 3,20C5.5,16.5 9,14.9 14,14.9V19L21,12Z"></path></svg>
</span>
</div>
</div>
<div class="caption" data-caption><?php if ($post_data['description']) {
echo $post_data['description'];
} ?></div>
<div class="comments-area">
<ul class="post-comments-list hidd">
<li class="pp_post_comms hidden"></li>
<?php if ($post_data['comments']) {
foreach ($post_data['comments'] as $key => $comment) {
include 'comments.html';
} } ?>
<?php if ($post_data['votes'] > 4) { ?>
<li class="load-comments">
<button onclick="load_tlp_comments(<?php echo $post_data['post_id']; ?>,this);">{{LANG show_more}} {{LANG comments}}</button>
</li>
<?php } ?>
</ul>
<form class="form add-comment" id="vote-postf-<?php echo $post_data['post_id']; ?>">
<div class="fluid">
<!--<div class="user-avatar">
<img src="{{ME avatar}}" width="34px" height="34px" class="img-circle">
</div>-->
<div class="form-group">
<input type="text" class="form-control comment" onkeydown="comment_post(<?php echo $post_data['post_id']; ?>,event);" placeholder="{{LANG write_comment}}" id="emojionearea<?php echo $post_data['post_id']; ?>">
</div>
</div>
<div class="commenting-overlay hidden">
<div id="pp_loader"><div class="speeding_wheel"></div></div>
</div>
</form>
</div>
</div>
<script>
add_emoji(<?php echo $post_data['post_id']; ?>);
jQuery(document).ready(function($) {
$('div[data-lightgallery="<?php echo $post_data['post_id']; ?>"]').lightGallery({
mode:'lg-fade',
zoom:true,
scale:1,
actualSize:false
}).on('onBeforeOpen.lg', function(event) {
event.preventDefault();
$("body").delay(1000).addClass('page__numb');
}).on('onBeforeClose.lg',function(event) {
event.preventDefault();
$("body").delay(1000).removeClass('page__numb');
});
});
</script>