Re: Lasted Visited Galleries By Country
Posted: Tue Jan 03, 2023 8:09 pm
Array ( [19443] => 19443 [12853] => 12853 [20659] => 20659 )
SmartCJ Support Forum
https://smartcj.com/forum/
Code: Select all
<script>
function updateLastVisited() {
$.ajax({
url: "/page/lasted_visited/", cache: false, success: function (html) {
$("#lasted_visited").html(html);
}
});
}
function updateCountryViewed() {
$.ajax({
url: "/scj/tube/index.php?force_template=viewed_in_country&last_viewed_cache_id=last_items_<?=$_SERVER['GEOIP_COUNTRY_CODE']?>",
cache: false,
success: function (html) {
$("#viewed_in_country").html(html);
}
});
}
$(document).ready(function () {
updateLastVisited();
setInterval(updateLastVisited, 10 * 60 * 1000);
updateCountryViewed();
setInterval(updateCountryViewed, 10 * 60 * 1000);
});
</script>Code: Select all
<thumb num=1-40 limit_by_gallery_id=true gallery_id=CACHE_GET_last_viewed_cache_id>
<li class="swiper-slide">
<article>
<a class="ths-preview-link" href="/video/<!--GALLERY_ID-->/<!--SAFE_ALT-->/" target="_blank">
<figure>
<img src="<!--THUMB_URL-->" class="lazy" width="320" height="180">
</figure>
</a>
<h3><a href="/video/<!--GALLERY_ID-->/<!--SAFE_ALT-->/"><!--ALT--></a></h3>
<footer>
<span class="likes"><?=min(round(100*"<!--RATING_2-->"/("<!--RATING_2-->"+"<!--RATING_1-->"+0.001)), 100)?>%</span>
<span class="views"><?=number_format("<!--SHOWS-->", 0, '', ' ');?></span>
<span class="durat"><!--DURATION--></span>
</footer>
</article>
</li>
</thumb>как в твоей вики