registerJsFile('https://platform-api.sharethis.com/js/sharethis.js#property=63ecb32f4a4876001374e328&product=inline-reaction-buttons', [ 'position' => $this::POS_END, 'async' => 'async', 'defer' => 'defer' ]); */ if( $model->type == 8){ if( $link = trim( $model->link ) ){ $link = str_replace( 'https://www.amic.ru', '', $link); if( preg_match('/\-(\d+)\/?$/',$link, $a) && isset($a[1]) ){ $tildaid = $a[1]; $file = file_get_contents( Yii::getAlias('@webroot').$link.'meta/inc'.$tildaid.'.json'); $obj = json_decode($file); $tilda = $obj->html; echo $this->render('@app/views/news/tilda',['html'=>$tilda,'model'=>$model, 'obj'=>$obj, 'id'=>$tildaid]); } return ''; } } $preview = $model->image; $retina = $preview->getUrl(Image::SIZE_1040x586,"jpg"); $normal = $preview->getUrl(Image::SIZE_841x473,"webp"); $bad = $preview->getUrl(Image::SIZE_680x383,'jpg'); if( $model->type == 6 ){; //лонгрид $retina = $preview->getUrl(Image::SIZE_HD,"jpg"); $normal = $preview->getUrl(Image::SIZE_HD,"jpg"); $bad = $preview->getUrl(Image::SIZE_1040x586,"webp"); } if( $model->type == 2 ){; //разворот $retina = $preview->getUrl(Image::SIZE_HD,"jpg"); $normal = $preview->getUrl(Image::SIZE_1040x586,"webp"); $bad = $preview->getUrl(Image::SIZE_841x473,"webp"); } $bad = $bad?$bad:'/images/default.jpg'; if( $retina === false || $normal === false ){ $normal = $bad; $retina = $bad; } $normal .= "?v=".$model->rev; $retina .= "?v=".$model->rev; $bad .= "?v=".$model->rev; /* После этой даты не выводить фото до подтверждения юриста */ if( isset( $model->dt_pub ) && !$model->isPhotosOnNews( $model->dt_pub ) ){ $bad = '/images/default.jpg'; $normal = $bad; $retina = $bad; }; $txt_date = date( "[Y-m-d] ", strtotime( $model->dt_pub ) ); Yii::$app->og->title =($model->meta_title)?$model->meta_title:$model->title; Yii::$app->og->description = ($model->lid && trim($model->lid) <> '')?str_replace( '"', """, strip_tags($model->lid) ):$txt_date.trim(str_replace( '"',"'",substr(strip_tags( $model->text ),0,150)))."..."; if( $model->active == 'N' || $model->dt_pub > date("Y-m-d H:i:s") || $model->noindex == 'Y' ){ Yii::$app->og->noindex = 'Y'; }else{ \Yii::$app->og->canonical = $model->getUrl(true); \Yii::$app->og->amp = Url::base('https').'/amp/news/'.$model->id; \Yii::$app->og->og_url = $model->getUrl(true); \Yii::$app->og->og_image = $model->image->url; \Yii::$app->og->og_type = "article"; \Yii::$app->og->og_title = htmlspecialchars(($model->meta_title)?strip_tags(str_replace( '"',""",$model->meta_title)):strip_tags(str_replace( '"',""",$model->title))); \Yii::$app->og->og_description = ($model->lid && trim($model->lid) <> '')?str_replace( '"',""",strip_tags($model->lid)):$txt_date.trim(str_replace( '"',""",substr(strip_tags( $model->text ),0,150)))."..."; \Yii::$app->og->dtpub = date( "r", strtotime( $model->dt_pub ) ); } jsonLD::addAmicORG(); jsonLD::news( $model->title, preg_replace('/\s+/', ' ', str_replace( ["\n","\r"],' ',Yii::$app->og->description)), $model->image->url, $model->dt_pub, $model->getUrl(), $model->uid, $model->text, $model->meta_title); jsonLD::addfaq($model->text, $model->title); $story = new \app\models\base\Story(); $this->params['breadcrumbs'] = [ [ "text"=>"НОВОСТИ", "url"=>"/news" ] ]; $this->params['context'] = "post-view"; //$topic = ArrayHelper::getValue($model->topics,0); $topic = Yii::$app->cache->getOrSet('topic-news-'.$model->id, function () use($model){ return $model->getTopics()->andWhere(['show'=>"Y","active"=>1])->orderBy('order asc')->one(); }, News::$keysCache['topic-news-##']); if($topic instanceof \app\models\base\NewsTopic){ $this->params['breadcrumbs'][] = [ "text"=>$topic->title, "url"=>"/news/".mb_strtolower($topic->url) ]; } $i = 1; foreach($this->params['breadcrumbs'] as $el){ jsonLD::addBreadcrumb($i, $el['url'], $el['text']); $i++; } if( $model->show_author == 'Y' ) { $author = Authors::getAuthor( $model->author ); $authorName = $author->name; \Yii::$app->og->author =$authorName; jsonLD::author( $authorName ); }else{ $authorName = 'ИА Амител'; jsonLD::author( $authorName, false ); } if( strstr( $model->text, 'id="widgetseting"' ) && strstr( $model->text, 'windows="100"' ) ) $model->type = 2; //старый стиль широкой страницы $GLOBALS['type_long'] = ($model->type == 6); //лонгрид ?> embed_url) && $model->embed_url!=''):?>
" media="(min-width: 600px)"> " media="(min-width: 600px)"> " media="(min-width: 500px)"> <?=\yii\helpers\Html::encode($model->photo_title)?> 680w" class="w-100" loading="lazy">
user->can('editor') ){ ?> render("/layouts/breadcrumbs")?>

title?>

lid?>

getPublishedNorm()?>, mark!="" && !is_null($model->mark)) ? \yii\helpers\Html::tag('span', 'erid: '.$model->mark,['class'=>'float-right']) : ""?>

photo_include == 'Y' && $model->image instanceof \app\models\base\Image):?>

<?=htmlentities($model->photo_title,ENT_QUOTES)?>
photo_title?>

renderBody()?> inscription == 2)?'':''?> inscription == 1)?'
Имеются противопоказания, необходима консультация специалиста':''?> inscription == 3)?'':''?>
render("@app/views/news/view/tags",["model"=>$model]); if(Yii::$app->deviceDetect->isMobile()){ echo $this->render("@app/views/_etc/banners/BannersPostNews"); } ?> getForNews($model->id); if( count($stn) > 0 ){ echo $this->render("@app/views/news/view/story",["model"=>$stn, "id"=>$model->id]); foreach( $stn as $a ){ jsonLD::story( trim( stripslashes( $a['title'] ) ) ); } } ?> deviceDetect->isMobile()): ?>
render('@app/views/_etc/banners/bannerMobile3')?>
render('@app/views/_etc/banners/transparant5')?>
render("view/comments/list",["model"=>$model])?>
render("/layouts/lenta/lenta_right")?>

Новости партнеров

render('@app/views/_etc/banners/partnermetrics')?>
render('@app/views/_etc/banners/partner3D')?> render('@app/views/_etc/banners/partner2D')?> render('@app/views/_etc/banners/partner1D')?> */?> deviceDetect->isMobile()){ echo $this->render('@app/views/_etc/banners/moevideo'); } ?>
render("view/infinity_newsfeed",['model'=>$model])?>
text, 'class="InviewElement' ) !== false ){ echo $this->render('view/inview'); } ?> registerJsFile("/js/splide/dist/js/splide.min.js"); $this->registerCssFile("/js/splide/dist/css/splide.min.css") ?> mark!="" && !is_null($model->mark) && is_null(\Yii::$app->request->get('erid'))):?> acache; if( $c->get('fotorama') === true || 1){ $this->registerJsFile( '@web/js/fotorama/fotorama.js', [ 'depends' => [\yii\web\JqueryAsset::class], 'defer' =>true, 'position' => View::POS_END ], 'js-fotorama' ); $this->registerCssFile("@web/js/fotorama/fotorama.css", [], 'css-fotorama'); } /* if( Yii::$app->deviceDetect->isMobile() ){ $this->registerJs( <<registerJs( <<