image; $retina = $preview->getUrl(Image::SIZE_HD,"jpg"); $normal = $preview->getUrl(Image::SIZE_1040x586,"webp"); $bad = $preview->getUrl(Image::SIZE_680x383,'jpg'); //$bad = $bad?$bad:'/images/default.jpg'; if( $normal === false ){ $normal = $bad; } if( $retina === false ){ $retina = $normal; } $normal .= "?v=".$model->rev; $retina .= "?v=".$model->rev; $bad .= "?v=".$model->rev; $picture = $normal; if( $model->show_author == 'Y' ) { $author = Authors::getAuthor( $model->author ); $authorName = $author->name; }else{ $authorName = 'ИА Амител'; } $title = Html::encode( ( trim($model->meta_title) == '' )?$model->title:$model->meta_title ); $this->title = $title; $this->registerLinkTag([ 'rel' => 'canonical', 'href' => $model->getUrl(true)], 'canonical'); $lid = Html::encode( ($model->lid && trim($model->lid) <> '')?$model->lid:mb_substr( trim($model->text) ,0,150)."..." ); //$ampProducer = new AmpProducer(['model'=>$model]); $converter = new Converter([ 'image_base_url' => 'https://www.amic.ru', 'image_timeout' => 5 ]); //Чистка $s = preg_replace( '/]+)>/i', '
', $model->text ); $sa = explode( '+++', $s ); $s = $sa[0]; $pattern = array( '/