add files

This commit is contained in:
Andrey Kuvshinov
2025-07-09 21:21:17 +03:00
commit 8fc8cbae32
596 changed files with 207566 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<!--[single/ajax-load-more-mamleev]-->
<?php
echo "<!---" . get_the_category( get_queried_object_id() )[0]->term_id . "---->";
$post_alm_shortcode = '
[ajax_load_more
cache="false"
cache_id="' . get_alm_cache_id() . '"
container_type="div"
post_type="' . get_post_type() . '"
repeater="template_22"
posts_per_page="100"
css_classes="row"
category__and="' . get_the_category( get_queried_object_id() )[0]->term_id . '"
post_format="standard"
id="archive"
post__not_in="' . get_the_ID() . '"
]';
echo do_shortcode( $post_alm_shortcode );
?>
<!--[/single/ajax-load-more-mamleev]-->

View File

@@ -0,0 +1,23 @@
<!--[single/ajax-load-more]-->
<?php
$post_alm_shortcode = '
[ajax_load_more
cache="true"
cache_id="' . get_alm_cache_id() . '"
container_type="div"
post_type="' . get_post_type() . '"
repeater="template_23"
posts_per_page="30"
css_classes="row"
post_format="standard"
id="archive"
post__not_in="' . get_the_ID() . '"
]';
//echo do_shortcode( $post_alm_shortcode );
?>
<!--[/single/ajax-load-more]-->

View File

@@ -0,0 +1,15 @@
<!--[single/disclaimer]-->
<?php
//TODO:Перенести в фильтр и добавлять в текст новостей еще и в фиде
if ( function_exists( 'get_disclaimer' ) ) {
echo get_disclaimer();
}
?>
<!--[/single/disclaimer]-->

View File

@@ -0,0 +1,17 @@
<!--[single/post-author]-->
<?php foreach (get_coauthors() as $author ): ?>
<a class="publication__author" href="<?= get_author_posts_url( $author->ID, $author->user_nicename ); ?>" itemprop="author" itemscope itemtype="https://schema.org/Person">
<?= $author->display_name; ?>
<meta itemprop="name" content="<?= htmlspecialchars($author->display_name); ?>" />
<link itemprop="url" href="<?= get_author_posts_url( $author->ID, $author->user_nicename ); ?>" />
</a>
<?php endforeach; ?>
<!--[/single/post-author]-->

View File

@@ -0,0 +1,11 @@
<!--[single/post-data]-->
<div class="publication__data">
<?php get_template_part("template-parts/single/post-date") ?>
<?php get_template_part("template-parts/single/post-author") ?>
</div>
<!--[/single/post-data]-->

View File

@@ -0,0 +1,9 @@
<!--[single/post-date]-->
<span class="publication__number" itemprop="datePublished" content="<?= get_the_date("Y-m-d H:i:s"); ?>">
<?= get_the_date("d.m.Y H:i") ?>
</span>
<!--[/single/post-date]-->

View File

@@ -0,0 +1,63 @@
<!--[single/post]-->
<div class="profile_onenews" itemscope itemtype="https://schema.org/NewsArticle">
<?php get_template_part("template-parts/single/post-data") ?>
<?php get_template_part("template-parts/micro/post"); ?>
<h1 class="profile_onenews__title">
<?= the_title() ?>
</h1>
<?php if (has_secondary_title()): ?>
<h2 class="profile_onenews__subtitle mb-4">
<?= get_secondary_title(); ?>
</h2>
<?php endif; ?>
<?php get_template_part("template-parts/single/disclaimer") ?>
<div class="profile_onenews__body">
<?php get_template_part("template-parts/single/post-social-share") ?>
<?php if( has_post_thumbnail() && show_post_thumbnail() ) : ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
<div class="micromarking">
<?= get_first_pharagraph( get_the_content() ) ?>
<?= the_content() ?>
</div>
<?php get_template_part("template-parts/single/banned") ?>
<?php get_template_part("template-parts/single/post-subscribe-disclaimer") ?>
<?php get_template_part("template-parts/single/post-tags") ?>
<?php get_template_part("template-parts/single/post-most-popular") ?>
<?php get_template_part("template-parts/partners/smi2") ?>
<?php get_template_part("template-parts/partners/setka") ?>
<?php get_template_part("template-parts/single/ajax-load-more") ?>
</div>
</div>
<!--[/single/post]-->

View File

@@ -0,0 +1,71 @@
<!--[single/post-infozoid-posts]-->
<?php
$option = get_option("infozoid_posts");
$posts = [];
if(isStringJson($option)){
$posts = json_decode($option);
}
?>
<?php if(count($posts) !== 0): ?>
<style>
.infozoid__category{
margin-left:12px;
}
.infozoid__category:before {
content: '';
position: absolute;
top: -4px;
bottom: -3px;
left: -5px;
right: -5px;
-webkit-transform: skew(-15deg);
-ms-transform: skew(-15deg);
transform: skew(-15deg);
background: #4c5866;
z-index:1;
}
.infozoid__category span{
display: inline-block;
position:relative;
padding:0 2px 2px 2px;
line-height:1px;
font-weight: bold;
z-index:2;
color:#fff;
text-transform: uppercase;
color:#fff;
font-family: 'PT Sans Narrow', sans-serif;
}
</style>
<div class="row mb-5 d-md-none">
<?php foreach ($posts as $post): ?>
<a target="_blank" href="<?= $post->link ?>" class="col col-6 p-0" style="border:8px solid #303030;position: relative;">
<img loading="lazy" alt="<?= $post->title ?>" src="<?= $post->image ?>" style="width:100%!important;" />
<div style="position:absolute;z-index:10;left:0;bottom:0;width:100%;">
<span class="infozoid__category position-relative">
<span>
<?= $post->category ?>
</span>
</span>
<h6 style="line-height:1;padding:4px;text-transform: uppercase; font-family: 'PT Sans Narrow', sans-serif; color:#000; text-shadow: 2px 2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, -2px -2px 0 #fff, 2px 0px 0 #fff, 0px 2px 0 #fff, -2px 0px 0 #fff, 0px -2px 0 #fff;">
<?= $post->title ?>
</h6>
</div>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<!--[/single/post-infozoid-posts]-->

View File

@@ -0,0 +1,59 @@
<!--[single/post-mamleev]-->
<div class="profile_onenews" itemscope itemtype="https://schema.org/NewsArticle">
<?php get_template_part("template-parts/single/post-data") ?>
<?php get_template_part("template-parts/micro/post"); ?>
<h1 class="profile_onenews__title">
<?= the_title() ?>
</h1>
<?php if (has_secondary_title()): ?>
<h2 class="profile_onenews__subtitle mb-4">
<?= get_secondary_title(); ?>
</h2>
<?php endif; ?>
<?php get_template_part("template-parts/single/post-social-share-mobile") ?>
<?php get_template_part("template-parts/single/disclaimer") ?>
<?= get_first_pharagraph( get_the_content() ) ?>
<div class="profile_onenews__body">
<?php get_template_part("template-parts/single/post-social-share-desktop") ?>
<?php if( has_post_thumbnail() && show_post_thumbnail() ) : ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
<div class="micromarking">
<?= the_content() ?>
</div>
<?php get_template_part("template-parts/single/banned") ?>
<?php get_template_part("template-parts/single/post-social-share-mobile") ?>
<?php get_template_part("template-parts/single/post-tags") ?>
<?php get_template_part("template-parts/single/ajax-load-more-mamleev") ?>
</div>
</div>
<!--[single/post-mamleev]-->

View File

@@ -0,0 +1,35 @@
<!--[single/post-most-popular-item]-->
<div class="col-12 col-md-4 d-none" data-id="<?= get_the_ID() ?>">
<a class="partners__item d-flex d-md-block" href="<?= the_permalink() ?>">
<?php //get_template_part("template-parts/micro/post"); ?>
<span class="partners__frame">
<figure>
<img loading="lazy"
itemprop="image"
class="d-block"
src="<?= the_post_thumbnail_url("thumb-264"); ?>"
alt="<?= htmlspecialchars( get_the_title() ) ?>" />
</figure>
</span>
<strong class="partners__item__title">
<?= the_title() ?>
</strong>
<?php //get_template_part("template-parts/micro/author") ?>
</a>
</div>
<!--[/single/post-most-popular-item]-->

View File

@@ -0,0 +1,92 @@
<!--[single/post-most-popular]-->
<?php
$ids = array_map(
function ($item) {
return $item->id;
},
json_decode(
get_option("ppp_options")
)
);
$popular_query = new WP_Query(
[
"post_type" => ["anew", "yellow"],
"post_status" => "publish",
"posts_per_page" => 10,
"ignore_sticky_posts" => true,
"post__in" => $ids,
"post__not_in" => get_queried_object_id(),
"orderby" => "post__in",
"meta_query" => [
"key" => "_thumbnail_id",
"compare" => "EXISTS"
]
]
);
?>
<?php if( $popular_query->have_posts() ): ?>
<div class="partners" id="popular">
<div class="partners__header">
Самое читаемое
</div>
<div class="row">
<?php while( $popular_query->have_posts() ): ?>
<?php $popular_query->the_post(); ?>
<?php get_template_part("template-parts/single/post-most-popular-item") ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<script>
(function () {
let count = 0;
let current = <?= get_queried_object_id() ?>;
let visited = ( getCookie('visited') || "" ).split(',');
visited.push( current );
visited = visited.slice(-7);
setCookie('visited', visited.join(","), {secure: true, 'max-age': 3600});
document.querySelectorAll("#popular div[data-id]").forEach((elem) => {
if( !visited.includes( elem.getAttribute("data-id") ) && count < 3 ) {
elem.classList.remove("d-none");
count++;
}
})
})();
</script>
<?php endif; ?>
<!--[/single/post-most-popular]-->

View File

@@ -0,0 +1,41 @@
<!--[single/post-social-share-desktop]-->
<div class="stick js-stickybit d-none d-lg-block">
<div class="ya-share2__list">
<a class="ya-share2__item vk" target="_blank" href="https://vk.com/share.php?url=<?= urlencode( the_permalink() . "?utm_from=vk_share" ) ?>&title=<?= urlencode( the_title() ) ?>" title="Поделиться во Вконтакте">
<span class="ya-share2__badge">
<span class="ya-share2__icon"></span>
</span>
</a>
<a class="ya-share2__item telegram" target="_blank" href="tg://msg_url?url=<?= urlencode( the_permalink() . "?utm_from=tg_share" ) ?>&text=<?= urlencode( the_title() ) ?>" title="Поделиться в Телеграм">
<span class="ya-share2__badge">
<span class="ya-share2__icon"></span>
</span>
</a>
<a class="ya-share2__item ok" target="_blank" href="https://connect.ok.ru/offer?url=<?= urlencode( the_permalink() . "?utm_from=ok_share" ) ?>&title=<?= urlencode( the_title() ) ?>" title="Поделиться в Одноклассниках">
<span class="ya-share2__badge">
<span class="ya-share2__icon"></span>
</span>
</a>
</div>
</div>
<!--[single/post-social-share-desktop]-->

View File

@@ -0,0 +1,41 @@
<!--[single/post-social-share-mobile]-->
<div class="stick js-stickybit d-xs-none d-lg-none">
<div class="ya-share2__list">
<a class="ya-share2__item vk" target="_blank" href="https://vk.com/share.php?url=<?= urlencode( the_permalink() . "?utm_from=vk_share" ) ?>&title=<?= urlencode( the_title() ) ?>" title="Поделиться во Вконтакте">
<span class="ya-share2__badge">
<span class="ya-share2__icon"></span>
</span>
</a>
<a class="ya-share2__item telegram" target="_blank" href="tg://msg_url?url=<?= urlencode( the_permalink() . "?utm_from=tg_share" ) ?>&text=<?= urlencode( the_title() ) ?>" title="Поделиться в Телеграм">
<span class="ya-share2__badge">
<span class="ya-share2__icon"></span>
</span>
</a>
<a class="ya-share2__item ok" target="_blank" href="https://connect.ok.ru/offer?url=<?= urlencode( the_permalink() . "?utm_from=ok_share" ) ?>&title=<?= urlencode( the_title() ) ?>" title="Поделиться в Одноклассниках">
<span class="ya-share2__badge">
<span class="ya-share2__icon"></span>
</span>
</a>
</div>
</div>
<!--[single/post-social-share-mobile]-->

View File

@@ -0,0 +1,15 @@
<!--[single/post-social-share]-->
<?php if( wp_is_mobile() ) : ?>
<?php get_template_part("template-parts/single/post-social-share-mobile"); ?>
<?php else : ?>
<?php get_template_part("template-parts/single/post-social-share-desktop"); ?>
<?php endif; ?>
<!--[/single/post-social-share]-->

View File

@@ -0,0 +1,11 @@
<!--[single/post-subscribe-disclaimer-articles]-->
<div class="clearfix">
<p>
Читайте на смартфоне наши Telegram-каналы: <a href="https://t.me/profile_newzzz/" target="_blank">Профиль-News</a>, и <a href="https://t.me/profilejournal" target="_blank">журнал Профиль</a>. Скачивайте полностью <a href="https://profile.ru/mobilnye-prilozheniya/" target="_blank">бесплатное мобильное</a> приложение журнала "Профиль".
</p>
</div>
<!--[/single/post-subscribe-disclaimer-articles]-->

View File

@@ -0,0 +1,11 @@
<!--[single/post-subscribe-disclaimer-news]-->
<div class="clearfix">
<p>
Читайте на смартфоне наши Telegram-каналы: <a href="https://t.me/profile_newzzz/" target="_blank">Профиль-News</a>, и <a href="https://t.me/profilejournal" target="_blank">журнал Профиль</a>. Скачивайте полностью <a href="https://profile.ru/mobilnye-prilozheniya/" target="_blank">бесплатное мобильное</a> приложение журнала "Профиль".
</p>
</div>
<!--[/single/post-subscribe-disclaimer-news]-->

View File

@@ -0,0 +1,13 @@
<!--[single/post-subscribe-disclaimer]-->
<?php if ( get_post_type( get_queried_object_id() ) == "profile_article" ) : ?>
<?php get_template_part("template-parts/single/post-subscribe-disclaimer-articles") ?>
<?php else : ?>
<?php get_template_part("template-parts/single/post-subscribe-disclaimer-news") ?>
<?php endif; ?>
<!--[/single/post-subscribe-disclaimer]-->

View File

@@ -0,0 +1,31 @@
<!--[single/post-tags]-->
<?php
$tags = get_the_tags();
?>
<?php if( $tags ): ?>
<div class="tags-list my-4">
<span class="mr-3">
Метки:
</span>
<?php foreach ( $tags as $tag ): ?>
<a class="mr-3" href="<?= esc_attr( get_tag_link( $tag->term_id ) ) ?>">
<?= $tag->name ?>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<!--[/single/post-tags]-->

View File

@@ -0,0 +1,85 @@
<!--[single/post]-->
<div class="profile_onenews" itemscope itemtype="https://schema.org/NewsArticle">
<?php if( !is_in_dk() ) : ?>
<div class="mb-4 position-relative">
<?php get_template_part("template-parts/ad/revive/ad", "", [ "zone" => 12 ]) ?>
</div>
<?php endif; ?>
<?php get_template_part("template-parts/single/post-data") ?>
<?php get_template_part("template-parts/micro/post"); ?>
<h1 class="profile_onenews__title">
<?= the_title() ?>
</h1>
<?php if (has_secondary_title()): ?>
<h2 class="profile_onenews__subtitle mb-4">
<?= get_secondary_title(); ?>
</h2>
<?php endif; ?>
<?php get_template_part("template-parts/single/post-social-share-mobile") ?>
<?php get_template_part("template-parts/single/disclaimer") ?>
<?= get_first_pharagraph( get_the_content() ) ?>
<div class="profile_onenews__body">
<?php get_template_part("template-parts/single/post-social-share-desktop") ?>
<?php if( has_post_thumbnail() && show_post_thumbnail() ) : ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
<div class="micromarking">
<?= the_content() ?>
</div>
<?php get_template_part("template-parts/single/banned") ?>
<?php get_template_part("template-parts/single/post-subscribe-disclaimer") ?>
<?php get_template_part("template-parts/single/post-social-share-mobile") ?>
<?php get_template_part("template-parts/single/post-tags") ?>
<?php if(wp_is_mobile() && get_field("trafgen") == 1): ?>
<?php get_template_part("template-parts/single/post-infozoid-posts") ?>
<?php endif; ?>
<?php get_template_part("template-parts/single/post-most-popular") ?>
<?php get_template_part("template-parts/partners/smi2") ?>
<?php //get_template_part("template-parts/partners/setka") ?>
<?php get_template_part("template-parts/ad/adfox/ad-inlist-1") ?>
<?php get_template_part("template-parts/single/ajax-load-more") ?>
</div>
</div>
<!--[/single/post]-->