| Current Path : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/most_liked/ |
| Current File : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/most_liked/content.phtml |
<div class="page-margin">
<div class="row">
<div class="col-md-2 leftcol"><?php echo Wo_LoadPage("sidebar/left-sidebar"); ?></div>
<div class="col-md-7 profile-lists middlecol">
<div class="page-margin mt-0">
<div class="wow_content popular_posts_hdr">
<img src="<?php echo $wo['config']['theme_url'];?>/img/popular.png" class="bg_trail">
<h2><svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.73133 11.4735C7.85833 11.1279 8.3652 11.1279 8.4922 11.4735L8.83947 12.4186C8.88012 12.5292 8.97037 12.6162 9.0851 12.6554L10.0652 12.9903C10.4236 13.1128 10.4236 13.6015 10.0652 13.724L9.0851 14.0589C8.97038 14.0981 8.88012 14.1851 8.83947 14.2957L8.4922 15.2408C8.3652 15.5864 7.85833 15.5864 7.73133 15.2408L7.38406 14.2957C7.3434 14.1851 7.25315 14.0981 7.13842 14.0589L6.15835 13.724C5.79994 13.6015 5.79994 13.1128 6.15835 12.9903L7.13842 12.6554C7.25315 12.6162 7.3434 12.5292 7.38406 12.4186L7.73133 11.4735Z" class="icon_main_fill"></path><path d="M9.20019 0.893984C9.39322 0.368672 10.1636 0.368672 10.3567 0.893985L11.0183 2.69444C11.08 2.86259 11.2172 2.99487 11.3916 3.05445L13.2587 3.69241C13.8035 3.87855 13.8035 4.62145 13.2587 4.80759L11.3916 5.44555C11.2172 5.50513 11.08 5.63741 11.0183 5.80556L10.3567 7.60602C10.1636 8.13133 9.39322 8.13133 9.20019 7.60601L8.5386 5.80556C8.47681 5.63741 8.33963 5.50513 8.16525 5.44555L6.29812 4.80759C5.75335 4.62145 5.75335 3.87855 6.29812 3.69241L8.16525 3.05445C8.33963 2.99487 8.47681 2.86259 8.5386 2.69444L9.20019 0.893984Z" class="icon_main_fill"></path><path d="M2.406 5.80241C2.54887 5.3992 3.1191 5.3992 3.26197 5.80241L3.65265 6.90499C3.69839 7.03406 3.79992 7.1356 3.92899 7.18133L5.03157 7.57201C5.43479 7.71488 5.43479 8.28512 5.03157 8.42799L3.92899 8.81867C3.79992 8.8644 3.69839 8.96594 3.65265 9.09501L3.26197 10.1976C3.1191 10.6008 2.54887 10.6008 2.406 10.1976L2.01531 9.09501C1.96958 8.96594 1.86804 8.8644 1.73898 8.81867L0.636395 8.42799C0.233181 8.28512 0.233181 7.71488 0.636395 7.57201L1.73898 7.18133C1.86804 7.1356 1.96958 7.03406 2.01531 6.90499L2.406 5.80241Z" class="icon_main_fill"></path></svg> <?php echo TextForMode('popular_posts_comments'); ?></h2>
</div>
</div>
<div id="mlposts">
<?php
$most_liked = $wo['most_liked'];
if (count($most_liked) <= 0) {
echo '<div class="wow_content"><div class="empty_state"><svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.73133 11.4735C7.85833 11.1279 8.3652 11.1279 8.4922 11.4735L8.83947 12.4186C8.88012 12.5292 8.97037 12.6162 9.0851 12.6554L10.0652 12.9903C10.4236 13.1128 10.4236 13.6015 10.0652 13.724L9.0851 14.0589C8.97038 14.0981 8.88012 14.1851 8.83947 14.2957L8.4922 15.2408C8.3652 15.5864 7.85833 15.5864 7.73133 15.2408L7.38406 14.2957C7.3434 14.1851 7.25315 14.0981 7.13842 14.0589L6.15835 13.724C5.79994 13.6015 5.79994 13.1128 6.15835 12.9903L7.13842 12.6554C7.25315 12.6162 7.3434 12.5292 7.38406 12.4186L7.73133 11.4735Z" class="icon_main_fill"></path>
<path d="M9.20019 0.893984C9.39322 0.368672 10.1636 0.368672 10.3567 0.893985L11.0183 2.69444C11.08 2.86259 11.2172 2.99487 11.3916 3.05445L13.2587 3.69241C13.8035 3.87855 13.8035 4.62145 13.2587 4.80759L11.3916 5.44555C11.2172 5.50513 11.08 5.63741 11.0183 5.80556L10.3567 7.60602C10.1636 8.13133 9.39322 8.13133 9.20019 7.60601L8.5386 5.80556C8.47681 5.63741 8.33963 5.50513 8.16525 5.44555L6.29812 4.80759C5.75335 4.62145 5.75335 3.87855 6.29812 3.69241L8.16525 3.05445C8.33963 2.99487 8.47681 2.86259 8.5386 2.69444L9.20019 0.893984Z" class="icon_main_fill"></path>
<path d="M2.406 5.80241C2.54887 5.3992 3.1191 5.3992 3.26197 5.80241L3.65265 6.90499C3.69839 7.03406 3.79992 7.1356 3.92899 7.18133L5.03157 7.57201C5.43479 7.71488 5.43479 8.28512 5.03157 8.42799L3.92899 8.81867C3.79992 8.8644 3.69839 8.96594 3.65265 9.09501L3.26197 10.1976C3.1191 10.6008 2.54887 10.6008 2.406 10.1976L2.01531 9.09501C1.96958 8.96594 1.86804 8.8644 1.73898 8.81867L0.636395 8.42799C0.233181 8.28512 0.233181 7.71488 0.636395 7.57201L1.73898 7.18133C1.86804 7.1356 1.96958 7.03406 2.01531 6.90499L2.406 5.80241Z" class="icon_main_fill"></path>
</svg>' . $wo['lang']['no_posts_found'] . '</div></div>';
} else {
foreach ($most_liked as $wo['story']) {
if( is_array($wo['story']) && isset( $wo['story']['id']) ){
echo Wo_LoadPage('story/content');
}
}
}
?>
</div>
<?php if (count($most_liked) > 0) { ?>
<div class="load-more pointer" id="load-more-posts" onclick="Wo_GetMoreMostLiked();"></div>
<?php } ?>
<!-- .load-more pointer -->
<div id="load-more-filter"><span class="filter-by-more hidden" data-filter-by="most_liked"></span></div>
<!-- #load-more-filter -->
<div class="clear"></div>
</div>
<?php echo Wo_LoadPage('sidebar/content');?>
</div>
</div>
<script>
$(function () {
xscrolled = 0;
var api = $('#api').val();
current_width = $(window).width();
if(current_width > 900 || api) {
$(window).scroll(function () {
if($('.footer-wrapper').scrollTop() > 500) {
$('.footer-wrapper .dropdown-menu').css('bottom', 'auto');
} else {
$('.footer-wrapper .dropdown-menu').css('bottom', '100%');
}
if($(document).scrollTop() > 200) {
$('.sidebar-sticky').addClass('Stick');
} else {
$('.sidebar-sticky').removeClass('Stick');
}
var nearToBottom = 100;
if($('#mlposts').length > 0) {
if ($(window).scrollTop() + $(window).height() > $(document).height() - nearToBottom) {
if (xscrolled == 0) {
xscrolled = 1;
Wo_GetMoreMostLiked();
}
}
}
});
}
});
function Wo_GetMoreMostLiked() {
var more_posts = $('#load-more-posts');
var after_post_id = $('div.post:last').attr('data-post-id');
var after_last_id = $('div.post:last').attr('data-post-id');
var lasttotal = $('div.post:last').attr('data-post-total');
var ids = $('div.post:last').attr('data-post-ids');
var dt = $('div.post:last').attr('data-post-dt');
$('#mlposts').append('<div class="hidden loading-status loading-single"></div>');
$('#load-more-posts').hide();
$('.loading-status').hide().html('<div class="wo_loading_post"><div class="wo_loading_post_child2"></div></div>').removeClass('hidden').show();
Wo_progressIconLoader($('#load-more-posts'));
posts_count = 0;
if ($('.post').length > 0) {
posts_count = $('.post').length;
}
$.get(Wo_Ajax_Requests_File(), {
f: 'get_more_most_liked',
after_last_id: after_last_id,
lasttotal: lasttotal,
ids:ids,
dt: dt
}, function (data) {
console.log( data );
if(data.status == 200) {
if(data.html == "") {
console.log('empty')
xscrolled = 1;
$('#load-more-posts').show().html('<div class="white-loading list-group"><div class="cs-loader"><div class="no-more-posts-to-show"><?php echo $wo['lang']['no_more_posts_to_show']; ?></div></div>');
} else {
$('#mlposts').append(data.html);
xscrolled = 0;
}
}
$('.loading-status').remove();
$('#load-more-posts').show();
Wo_progressIconLoader($('#load-more-posts'));
});
}
</script>