correct agrotop counter

This commit is contained in:
argoexpert press
2025-05-13 00:44:06 +03:00
parent 7310801599
commit 569c838c47
4 changed files with 28 additions and 17 deletions

View File

@@ -50,14 +50,6 @@
?> ?>
<div class="socials footer__socials"> <div class="socials footer__socials">
<?php get_template_part('partials/menu-socials'); ?> <?php get_template_part('partials/menu-socials'); ?>
<a href="https://agroserver.ru/" target="_blank">
<script language="javascript">
var r = escape(document.referrer);
var rd = Math.random();
var pr = 'https://top.agroserver.ru/ct/';
document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" height="31" border="0">');
</script></a>
<!--// Rating::top.agroserver.ru counter-->
</div> </div>
<div class="footer-bottom__text mobile"> <div class="footer-bottom__text mobile">
@@ -79,6 +71,9 @@ document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" heigh
<div> <div>
<p>When reproducing or utilizing content from the AgroExpert website, providing a valid link to the original material is required. For printed media use, AgroExpert should be credited as the source.</p> <p>When reproducing or utilizing content from the AgroExpert website, providing a valid link to the original material is required. For printed media use, AgroExpert should be credited as the source.</p>
</div> </div>
<div id="counter-container"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -41,15 +41,6 @@
<?php get_template_part('partials/menu-footer-bottom'); ?> <?php get_template_part('partials/menu-footer-bottom'); ?>
<div class="socials footer__socials"> <div class="socials footer__socials">
<?php get_template_part('partials/menu-socials'); ?> <?php get_template_part('partials/menu-socials'); ?>
<!--Rating::top.agroserver.ru counter-->
<a href="https://agroserver.ru/" target="_blank">
<script language="javascript">
var r = escape(document.referrer);
var rd = Math.random();
var pr = 'https://top.agroserver.ru/ct/';
document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" height="31" border="0">');
</script></a>
<!--// Rating::top.agroserver.ru counter-->
</div> </div>
<div class="footer-bottom__text mobile"> <div class="footer-bottom__text mobile">
@@ -71,7 +62,11 @@ document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" heigh
<div> <div>
<p>При перепечатке и использовании информации с сайта «Агроэксперт» активная ссылка на использованный материал обязательна. При использовании материалов в печатных СМИ указывать источник — «Агроэксперт».</p> <p>При перепечатке и использовании информации с сайта «Агроэксперт» активная ссылка на использованный материал обязательна. При использовании материалов в печатных СМИ указывать источник — «Агроэксперт».</p>
</div> </div>
<div id="counter-container"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -25,6 +25,7 @@ import './scripts/scroll-to-top.js';
import './scripts/search-form.js'; import './scripts/search-form.js';
import './scripts/select.js'; import './scripts/select.js';
import './scripts/subscription-form.js'; import './scripts/subscription-form.js';
import './scripts/agroserver.js';
import './styles/components/about.css'; import './styles/components/about.css';
import './styles/components/banner.css'; import './styles/components/banner.css';
import './styles/components/breadcrumbs.css'; import './styles/components/breadcrumbs.css';

View File

@@ -0,0 +1,20 @@
(function() {
document.addEventListener('DOMContentLoaded', function() {
var container = document.getElementById('counter-container');
if (!container) return;
var r = encodeURIComponent(document.referrer);
var rd = Math.random();
var pr = 'https://top.agroserver.ru/ct/';
var img = new Image();
img.src = pr + '?uid=18819&ref=' + r + '&rd=' + rd;
img.width = 88;
img.height = 31;
img.alt = 'Agroserver Counter';
img.loading = 'lazy'; // если поддерживается — ещё быстрее
container.appendChild(img);
});
})();