add fix problem
This commit is contained in:
35
blocks/mainnews.php
Normal file
35
blocks/mainnews.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$params = array(
|
||||||
|
'posts_per_page' => -1, // нужно для отображения всех постов, без разделения по страницам
|
||||||
|
'post__in' => get_option( 'sticky_posts' ),
|
||||||
|
'posts_per_page' => 1
|
||||||
|
);
|
||||||
|
|
||||||
|
$q = new WP_Query( $params );
|
||||||
|
|
||||||
|
if ( $q->have_posts() ) :
|
||||||
|
$q->the_post();
|
||||||
|
$mainpost_id = get_the_ID();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="main-card">
|
||||||
|
|
||||||
|
<?if ( has_post_thumbnail() ) :?>
|
||||||
|
<div class="card-img-top">
|
||||||
|
<a href="<?the_permalink();?>"><img src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
|
||||||
|
</div>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<h2 class="main-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
||||||
|
<div class="main-card-body">
|
||||||
|
<div class="main-card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></div>
|
||||||
|
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php endif; wp_reset_postdata();
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
$posts = get_posts( array(
|
$posts = get_posts( array(
|
||||||
'numberposts' => 4,
|
'numberposts' => 4,
|
||||||
'category' => 22, // пока тольео события
|
'category' => 2, // пока тольео события
|
||||||
'orderby' => 'date',
|
'orderby' => 'date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'include' => array(),
|
'include' => array(),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
$mosts = get_posts( array(
|
$mosts = get_posts( array(
|
||||||
'numberposts' => 3,
|
'numberposts' => 3,
|
||||||
'category' => 22, // пока без категории
|
'category' => 2, // пока без категории
|
||||||
'orderby' => 'date',
|
'orderby' => 'date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'include' => array(),
|
'include' => array(),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ $key = 'vij_opinions';
|
|||||||
if (!$opinions = kuri_set($key)) {
|
if (!$opinions = kuri_set($key)) {
|
||||||
$opinions = get_posts( array(
|
$opinions = get_posts( array(
|
||||||
'numberposts' => 1,
|
'numberposts' => 1,
|
||||||
'category' => 30, // 7 - мнения
|
'category' => 8, // 7 - мнения
|
||||||
'orderby' => 'date',
|
'orderby' => 'date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'include' => array(),
|
'include' => array(),
|
||||||
@@ -25,8 +25,8 @@ if(is_array($opinions)):
|
|||||||
$post = $opinions[0];?>
|
$post = $opinions[0];?>
|
||||||
|
|
||||||
<div class="left_opinion<?if ($args['subclass'] !== '') echo ' '.$args['subclass'];?>">
|
<div class="left_opinion<?if ($args['subclass'] !== '') echo ' '.$args['subclass'];?>">
|
||||||
<div class="left_opinion_title">мнение</div>
|
<div class="left_opinion_title"><a href="https://vetandlife.ru/category/mneniya/">мнение</a></div>
|
||||||
<img class="left_preview" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?=$post->post_title;?>">
|
<img class="left_preview" src="<?php echo get_the_post_thumbnail_url($post, 'fill');?>" alt="<?=$post->post_title;?>">
|
||||||
<div class="left_opinion_text"><a href="<?=get_permalink($post);?>"><?=$post->post_title;?></a></div>
|
<div class="left_opinion_text"><a href="<?=get_permalink($post);?>"><?=$post->post_title;?></a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ $nn = 0;?>
|
|||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul id="nav_content">
|
<ul id="nav_content">
|
||||||
<li><a href="http://beta.vetandlife.ru">Главная</li>
|
<li><a href="http://beta.vetandlife.ru">Главная</li>
|
||||||
<li> - <?single_cat_title()?></li>
|
<li> - <?single_cat_title()?></li>
|
||||||
|
|||||||
12
footer.php
12
footer.php
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<?php get_template_part( '/blocks/opinion', null, ['subclass' => '']);?>
|
<?php get_template_part( '/blocks/opinion', null, ['subclass' => '']);?>
|
||||||
<?php get_template_part( '/blocks/citata', null, ['subclass' => '']);?>
|
<?php //get_template_part( '/blocks/citata', null, ['subclass' => '']);?>
|
||||||
<?php get_template_part( '/blocks/events');?>
|
<?php get_template_part( '/blocks/events');?>
|
||||||
|
|
||||||
|
|
||||||
@@ -58,6 +58,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="right-info">
|
||||||
|
<a href="https://vetandlife.ru/consumer/proizvoditelej-i-retejl-ulichili-v-prodazhe-nebezopasnyh-i-falsificirovannyh-konservov/?utm_medium=banner&utm_campaign=mainpage&utm_source=site">
|
||||||
|
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/chestno-240x400-1.jpg" width="240" height="400" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?get_template_part( '/blocks/mosts', null, ['subclass' => '']);?>
|
<?get_template_part( '/blocks/mosts', null, ['subclass' => '']);?>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,7 +95,8 @@
|
|||||||
<a href="<?php echo home_url(); ?>"><img src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij-148-1.png" alt = "Ветеринария и жизнь. Газета и сайт" /></a>
|
<a href="<?php echo home_url(); ?>"><img src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij-148-1.png" alt = "Ветеринария и жизнь. Газета и сайт" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer_subscript">
|
<div id="footer_subscript">
|
||||||
<button class="sub_button">Газета ВиЖ. Оформить подписку</button>
|
<button class="sub_button" onclick="location.href='https://vetandlife.ru/subscripts'" type="button">
|
||||||
|
Газета ВиЖ. Оформить подписку</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="socials_footer">
|
<div id="socials_footer">
|
||||||
|
|
||||||
@@ -108,7 +114,7 @@
|
|||||||
<div id="copy">© Ветеринария и жизнь 2021</div>
|
<div id="copy">© Ветеринария и жизнь 2021</div>
|
||||||
<ul id="svid">
|
<ul id="svid">
|
||||||
<li>Свидетельство о регистрации СМИ</li>
|
<li>Свидетельство о регистрации СМИ</li>
|
||||||
<li>Политика конфидициальности</li>
|
<li><a href="https://vetandlife.ru/wp-content/uploads/2021/10/privacy.pdf" target="_blank">Политика конфидициальности</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
105
functions.php
105
functions.php
@@ -15,6 +15,7 @@ add_theme_support('post-thumbnails');
|
|||||||
# регистрируем размеры миниатюр
|
# регистрируем размеры миниатюр
|
||||||
add_image_size( 'left-thumb', 95, 84, true ); # для левой колонки
|
add_image_size( 'left-thumb', 95, 84, true ); # для левой колонки
|
||||||
add_image_size( 'moread', 372, 216, true ); # читайте также
|
add_image_size( 'moread', 372, 216, true ); # читайте также
|
||||||
|
add_image_size( 'subscripts', 198, 145, true ); # рассылка
|
||||||
|
|
||||||
|
|
||||||
#add scripts
|
#add scripts
|
||||||
@@ -70,3 +71,107 @@ function kuri_set($name = null, $value = null) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# время для rss
|
||||||
|
function _U2RFC822($date) {
|
||||||
|
|
||||||
|
$datatime = explode(" ",$date);
|
||||||
|
$dater = explode("-",$datatime[0]);
|
||||||
|
$timer = explode(":",$datatime[1]);
|
||||||
|
|
||||||
|
return date('r', mktime($timer[0], $timer[1], $timer[2], $dater[1], $dater[2], $dater[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
add_action( 'save_post', 'prefix_save_post' );
|
||||||
|
|
||||||
|
function prefix_save_post( $post_id ){
|
||||||
|
|
||||||
|
if ($post_id < 15765)
|
||||||
|
return; // старье не трогаем
|
||||||
|
|
||||||
|
if ( wp_is_post_revision( $post_id ))
|
||||||
|
return;
|
||||||
|
|
||||||
|
remove_action( 'save_post_insert', 'prefix_save_post' );
|
||||||
|
|
||||||
|
$post = get_posts($post_id);
|
||||||
|
$name = $post[0]->post_name;
|
||||||
|
// $newname = vij_slug($name);
|
||||||
|
|
||||||
|
file_put_contents("/vhosts/logs/translit.log", "$post_id: $name\n", FILE_APPEND);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function vij_slug($slug) {
|
||||||
|
$replace = array(
|
||||||
|
'А' => 'A', 'а' => 'a',
|
||||||
|
'Б' => 'B', 'б' => 'b',
|
||||||
|
'В' => 'V', 'в' => 'v',
|
||||||
|
'Г' => 'G', 'г' => 'g',
|
||||||
|
'Д' => 'D', 'д' => 'd',
|
||||||
|
'Е' => 'E', 'е' => 'e',
|
||||||
|
'Ё' => 'Jo', 'ё' => 'jo',
|
||||||
|
'Ж' => 'Zh', 'ж' => 'zh',
|
||||||
|
'З' => 'Z', 'з' => 'z',
|
||||||
|
'И' => 'I', 'и' => 'i',
|
||||||
|
'Й' => 'J', 'й' => 'j',
|
||||||
|
'К' => 'K', 'к' => 'k',
|
||||||
|
'Л' => 'L', 'л' => 'l',
|
||||||
|
'М' => 'M', 'м' => 'm',
|
||||||
|
'Н' => 'N', 'н' => 'n',
|
||||||
|
'О' => 'O', 'о' => 'o',
|
||||||
|
'П' => 'P', 'п' => 'p',
|
||||||
|
'Р' => 'R', 'р' => 'r',
|
||||||
|
'С' => 'S', 'с' => 's',
|
||||||
|
'Т' => 'T', 'т' => 't',
|
||||||
|
'У' => 'U', 'у' => 'u',
|
||||||
|
'Ф' => 'F', 'ф' => 'f',
|
||||||
|
'Х' => 'H', 'х' => 'h',
|
||||||
|
'Ц' => 'C', 'ц' => 'c',
|
||||||
|
'Ч' => 'Ch', 'ч' => 'ch',
|
||||||
|
'Ш' => 'Sh', 'ш' => 'sh',
|
||||||
|
'Щ' => 'Shh', 'щ' => 'shh',
|
||||||
|
'Ъ' => '', 'ъ' => '',
|
||||||
|
'Ы' => 'Y', 'ы' => 'y',
|
||||||
|
'Ь' => '', 'ь' => '',
|
||||||
|
'Э' => 'E', 'э' => 'e',
|
||||||
|
'Ю' => 'Ju', 'ю' => 'ju',
|
||||||
|
'Я' => 'Ya', 'я' => 'ya'
|
||||||
|
);
|
||||||
|
|
||||||
|
$newslug = strtr($slug, $replace);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return $newslug;
|
||||||
|
|
||||||
|
//return strtr($slug, $replace);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function view ($view, $data = array(), $layer = null){
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
if (is_array($data))
|
||||||
|
extract($data);
|
||||||
|
if ($layer !== null){
|
||||||
|
$content = view($view, $data);
|
||||||
|
require $layer;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
require $view;
|
||||||
|
|
||||||
|
return trim(ob_get_clean());
|
||||||
|
|
||||||
|
}
|
||||||
13
header.php
13
header.php
@@ -3,11 +3,20 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title><?php wp_title('|', true, 'right');?></title>
|
<title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
|
||||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=17">
|
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=22">
|
||||||
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
||||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
|
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
|
||||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script>
|
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script>
|
||||||
|
<meta property="og:title" content="<?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?>" />
|
||||||
|
<?if (isset($post->ID)):?>
|
||||||
|
<meta property="og:description" content="<?=get_the_excerpt( $post->ID )?>" />
|
||||||
|
<?if( has_post_thumbnail()):
|
||||||
|
$thumb_id = get_post_thumbnail_id($post->ID);
|
||||||
|
$thumb_url = wp_get_attachment_image_src($thumb_id,'large', false);?>
|
||||||
|
<meta property="og:image" content="<?=$thumb_url[0]?>">
|
||||||
|
<?endif?>
|
||||||
|
<?endif?>
|
||||||
<?php wp_head();?>
|
<?php wp_head();?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
42
index.php
42
index.php
@@ -9,9 +9,17 @@ $nn = 0;?>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1 id="mainpage-title">Главное</h1>
|
||||||
|
|
||||||
|
<?include(get_template_directory().'/blocks/mainnews.php');?>
|
||||||
|
|
||||||
<?php $query = new WP_Query(
|
<?php $query = new WP_Query(
|
||||||
array(
|
array(
|
||||||
'category__in' => array(2),
|
'category__in' => array(2),
|
||||||
|
'post__not_in' => array($mainpost_id),
|
||||||
'meta_query' => array(
|
'meta_query' => array(
|
||||||
array(
|
array(
|
||||||
'key' => '_thumbnail_id',
|
'key' => '_thumbnail_id',
|
||||||
@@ -22,36 +30,13 @@ $nn = 0;?>
|
|||||||
); # фильтруем рубрики
|
); # фильтруем рубрики
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="content">
|
<?php if($query->have_posts()) : ?>
|
||||||
|
|
||||||
<h1 id="mainpage-title">Главное</h1>
|
|
||||||
|
|
||||||
<?php if($query->have_posts()) : while($query->have_posts()) : $query->the_post();?>
|
|
||||||
|
|
||||||
<?$nn++;?>
|
|
||||||
|
|
||||||
<?if ($nn == 1):?>
|
|
||||||
|
|
||||||
<div class="main-card">
|
|
||||||
|
|
||||||
<?if ( has_post_thumbnail() ) :?>
|
|
||||||
<div class="card-img-top">
|
|
||||||
<a href="<?the_permalink();?>"><img src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
|
|
||||||
</div>
|
|
||||||
<?endif?>
|
|
||||||
|
|
||||||
<h2 class="main-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
|
||||||
<div class="main-card-body">
|
|
||||||
<div class="main-card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></div>
|
|
||||||
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?elseif ($nn == 2):?>
|
|
||||||
<div class="mini-card-block">
|
<div class="mini-card-block">
|
||||||
<?endif?>
|
|
||||||
|
|
||||||
<?if ($nn > 1):?>
|
<?php while($query->have_posts()) : $query->the_post();?>
|
||||||
|
|
||||||
|
|
||||||
<div class="mini-card">
|
<div class="mini-card">
|
||||||
<?if ( has_post_thumbnail() ) :?>
|
<?if ( has_post_thumbnail() ) :?>
|
||||||
@@ -65,11 +50,10 @@ $nn = 0;?>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?endif?>
|
|
||||||
|
|
||||||
<?php endwhile;?>
|
<?php endwhile;?>
|
||||||
|
|
||||||
</div> <!--//end minicard block -->
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -81,6 +65,8 @@ $nn = 0;?>
|
|||||||
<?get_template_part( '/blocks/citata', null, ['subclass' => 'mob-lite']);?>
|
<?get_template_part( '/blocks/citata', null, ['subclass' => 'mob-lite']);?>
|
||||||
<?get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
|
<?get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
|
||||||
|
|
||||||
|
<div class="publ-to-main"><a href="<?=get_site_url()?>/category/sobytiya"> <span class="arrow-go-main"><</span> <span class="go-to-main">Все события</span></a></div>
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- end content -->
|
</div> <!-- end content -->
|
||||||
|
|
||||||
|
|||||||
30
rsscreate.php
Normal file
30
rsscreate.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include_once '/vhosts/beta/wp-load.php';
|
||||||
|
|
||||||
|
date_default_timezone_set('Europe/Moscow');
|
||||||
|
|
||||||
|
$posts = get_posts( array(
|
||||||
|
'numberposts' => 20,
|
||||||
|
'category' => 2,
|
||||||
|
'orderby' => 'date',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'include' => array(),
|
||||||
|
'exclude' => array(),
|
||||||
|
'meta_key' => '',
|
||||||
|
'meta_value' =>'',
|
||||||
|
'post_type' => 'post',
|
||||||
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||||
|
));
|
||||||
|
|
||||||
|
if( $posts ){
|
||||||
|
|
||||||
|
include('views/rss/yanews.php');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
<?php include get_template_directory().'/blocks/moread.php';?>
|
<?php include get_template_directory().'/blocks/moread.php';?>
|
||||||
|
|
||||||
<div class="publ-to-main"><a href="http://beta.vetandlife.ru"> <span class="arrow-go-main"><</span> <span class="go-to-main">На главную</span></a></div>
|
<div class="publ-to-main"><a href="<?=get_site_url()?>"> <span class="arrow-go-main"><</span> <span class="go-to-main">На главную</span></a></div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
31
style.css
31
style.css
@@ -132,6 +132,13 @@ a{
|
|||||||
width: 340px;
|
width: 340px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-info{
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.wrap{
|
.wrap{
|
||||||
transform: translate(0%, 0%);
|
transform: translate(0%, 0%);
|
||||||
width: 0px;
|
width: 0px;
|
||||||
@@ -147,6 +154,8 @@ a{
|
|||||||
margin-left: 35px;*/
|
margin-left: 35px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.input{
|
.input{
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -502,6 +511,8 @@ a{
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
article{
|
article{
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
@@ -808,9 +819,10 @@ a{
|
|||||||
|
|
||||||
|
|
||||||
.left_preview{
|
.left_preview{
|
||||||
border-radius: 50%;
|
/*border-radius: 50%;*/
|
||||||
width: 95px;
|
/*width: 105px;
|
||||||
height: 84px;
|
height: 84px;*/
|
||||||
|
width: 145px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.publ_expert{
|
.publ_expert{
|
||||||
@@ -871,13 +883,14 @@ a{
|
|||||||
.left_opinion img{
|
.left_opinion img{
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
width: 84px;
|
/*width: 84px;
|
||||||
height: 84px;
|
height: 84px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.left_opinion_title{
|
.left_opinion_title{
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left_opinion_text{
|
.left_opinion_text{
|
||||||
@@ -1124,8 +1137,10 @@ a{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1231,6 +1246,7 @@ img-fluid{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.main-card-title{
|
.main-card-title{
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
@@ -1396,7 +1412,9 @@ img-fluid{
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fulltext IMG{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
#footer{
|
#footer{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1406,7 +1424,6 @@ img-fluid{
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
274
views/mailsub.php
Normal file
274
views/mailsub.php
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title><?=$title?></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" style="border-collapse:collapse;margin:0;table-layout:fixed;text-align:center" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<table width="600" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0" align="center">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" bgcolor="<<?=$background_logo?>">
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="20" style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" bgcolor="<?=$background_logo?>"> </td>
|
||||||
|
<td style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" bgcolor="<?=$backgroud_logo?>">
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15" colspan="2">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="48%" style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="26" align="left">
|
||||||
|
<a href="<?=$mainlink?>" target="_blank">
|
||||||
|
<img width="210" style="margin:0;background-color:<?=$background_logo?>;border:0;font-size:0px;line-height:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;outline:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;text-decoration:none;width:100%;max-width:210px" src="<?=$logo?>" alt="<?=$logoname?>"> </a>
|
||||||
|
</td>
|
||||||
|
<td width="52%" valign="middle" style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="26" align="right">
|
||||||
|
<table style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_logo?>;color:#fff;font-family:Arial,sans-serif;font-size:12px;letter-spacing:1px;line-height:14px;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="right">
|
||||||
|
<a style="color:#000000;font-family:Arial,sans-serif;font-size:14px;letter-spacing:1px;line-height:14px;text-decoration:none" href="<?=$mainlink?>" target="_blank"><b>ГЛАВНОЕ ЗА <?=$date?></b></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15" colspan="2">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="20" style="background-color:<?=$background_logo?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" bgcolor="<?=$background_logo?>"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed;min-width:600px" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="20" style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0"> </td>
|
||||||
|
<td width="100%" style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0">
|
||||||
|
<?foreach($items as $item):?>
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="38%" valign="top" style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="left">
|
||||||
|
<div style="max-width:<?=$news_img_w?>px;min-width:<?=$news_img_w?>px">
|
||||||
|
<?if (has_post_thumbnail($item->ID)):?>
|
||||||
|
<a style="border:0;outline:0;text-decoration:none" href="<?=get_permalink($item->ID);?>" target="_blank">
|
||||||
|
<img width="<?=$news_img_w?>" height="<?=$news_img_h?>" tyle="margin:0;background-color:#eaeaea;border:0;font-family:Arial,sans-serif;font-size:13px;line-height:14px;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;outline:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;text-decoration:none;width:100%" src="<?=get_the_post_thumbnail_url($item->ID, 'subscripts')?>" alt="<?=$item->post_title?>">
|
||||||
|
</a>
|
||||||
|
<?endif?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td width="62%" valign="top" style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0">
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="5" style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" rowspan="3"> </td>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="left">
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed;text-align:left" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="font-family:Arial,sans-serif;font-size:14px;line-height:20px;border:0;outline:0;text-decoration:none">
|
||||||
|
<a style="color:<?=$text_color?>;font-family:Arial,sans-serif;font-size:22px;line-height:120%;border:0;outline:0;text-decoration:none" href="<?=get_permalink($item->ID)?>" target="_blank" ><?=$item->post_title?></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="color:<?=$text_color?>;font-family:Arial,sans-serif;font-size:10px;line-height:14px;border:0;outline:0;text-decoration:none;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="left"><a style="width:110px;height:35px;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;border:0;outline:0;text-decoration:none;letter-spacing:0.8px" href="<?=get_permalink($item->ID)?>" target="_blank">
|
||||||
|
<img width="110" style="display:block;border:0" src="<?=PUBLINK?>readmore.png" height="35" border="0"></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="10" colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="1" colspan="2" bgcolor="#eaeaea"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="10" colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?endforeach?>
|
||||||
|
</td>
|
||||||
|
<td width="20" style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0"> </td></tr></tbody></table>
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<table width="200" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="font-family:Arial,sans-serif;font-size:10px;line-height:14px;color:<?=$styles['color_btn_more']?>;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;border:0;outline:0;text-decoration:none" height="40" bgcolor="<?=$styles['back_btn_more']?>" align="center">
|
||||||
|
<a style="font-family:Arial,sans-serif;font-size:15px;line-height:120%;color:<?=$styles['color_btn_more']?>;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;border:0;outline:0;text-decoration:none;letter-spacing:0.8px" href="<?=$mainlink?>" target="_blank" >БОЛЬШЕ НОВОСТЕЙ</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<table width="200" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="font-family:Arial,sans-serif;font-size:10px;line-height:14px;color:<?=$styles['color_btn_more']?>;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;border:0;outline:0;text-decoration:none" height="40" bgcolor="<?=$styles['back_btn_more']?>" align="center">
|
||||||
|
<a style="font-family:Arial,sans-serif;font-size:15px;line-height:120%;color:<?=$styles['color_btn_more']?>;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;border:0;outline:0;text-decoration:none;letter-spacing:0.8px" href="<?=$sublink?>" target="_blank">ПОДПИСАТЬСЯ</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="25"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table width="600" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" bgcolor="<?=$background_footer?>">
|
||||||
|
<table width="100%" style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:#<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<div style="color:#b2b2b2;font-family:Arial,sans-serif;font-size:13px;line-height:120%"><a href="https://yandex.ru/news/?favid=254162793"><img width="125" src="<?=PUBLINK?>yn.png"></a></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="5"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<div style="color:#b2b2b2;font-family:Arial,sans-serif;font-size:13px;line-height:120%"><b><a style="border:0;outline:0;text-decoration:none;color:#666666;" href="https://yandex.ru/news/?favid=254162793">Подписывайтесь на наши новости</a></b></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="10"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<table style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="10" style="background-color:#eaeaea;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0"> </td>
|
||||||
|
<?foreach ($soc as $s):?>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0">
|
||||||
|
<a style="border:0;outline:0;text-decoration:none" href="<?=$s['link']?>" target="_blank">
|
||||||
|
<img width="36" height="36" style="margin:0;border:0;font-size:0px;line-height:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;outline:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;text-decoration:none" src="<?=$s['img']?>"></a>
|
||||||
|
</td>
|
||||||
|
<td width="10" style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0"> </td>
|
||||||
|
<?endforeach?>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="8"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="5"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<table style="border-collapse:collapse;font-size:0px;line-height:0;table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="10" style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0"> </td>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0">
|
||||||
|
<div style="color:#b2b2b2;font-family:Arial,sans-serif;font-size:13px;line-height:120%">
|
||||||
|
<a style="border:0;color:#939393;font-family:Arial,sans-serif;font-size:13px;line-height:120%;outline:0;text-decoration:none" href="<?=$unsubscribe?>" target="_blank">
|
||||||
|
<span style="color:#939393">Отписаться от рассылки</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="5"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" align="center">
|
||||||
|
<div style="color:#b2b2b2;font-family:Arial,sans-serif;font-size:13px;line-height:120%"><?=$year?> © «Ветеринария и жизнь», <a style="color:#939393;text-decoration:none;"href="https://vetandlife.ru">vetandlife.ru</a></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-color:<?=$background_footer?>;font-size:0px;line-height:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0" height="15"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
29
views/rss/yanews.php
Normal file
29
views/rss/yanews.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?echo '<?xml version="1.0" encoding="UTF-8"?>';?>
|
||||||
|
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
|
||||||
|
<channel>
|
||||||
|
<title>Новости с сайта www.vetandlife.ru</title>
|
||||||
|
<link>https://www.vetandlife.ru</link>
|
||||||
|
<description>Новости с сайта www.vetandlife.ru</description>
|
||||||
|
<?foreach($posts as $post):?>
|
||||||
|
<item>
|
||||||
|
<title><?=htmlspecialchars($post->post_title)?></title>
|
||||||
|
<link><?=get_permalink($post->ID);?></link>
|
||||||
|
<description><?=htmlspecialchars($post->post_excerpt);?></description>
|
||||||
|
<?$category=get_the_category($post->ID);?>
|
||||||
|
<category>События</category>
|
||||||
|
<?$author = get_the_author($post->ID);?>
|
||||||
|
<?if (isset($author) and $author !== ''):?>
|
||||||
|
<author><?=$author?></author>
|
||||||
|
<?endif?>
|
||||||
|
<?if (has_post_thumbnail($post->ID)):?>
|
||||||
|
<enclosure url="<?=get_the_post_thumbnail_url($post->ID)?>" type="image/jpeg"/>
|
||||||
|
<?endif?>
|
||||||
|
<pubDate><?=_U2RFC822($post->post_date)?></pubDate>
|
||||||
|
<yandex:full-text><![CDATA[
|
||||||
|
<?=trim($post->post_content)?>
|
||||||
|
]]>
|
||||||
|
</yandex:full-text>
|
||||||
|
</item>
|
||||||
|
<?endforeach?>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
||||||
Reference in New Issue
Block a user