cache; $tmodel = new Tags(); $session = Yii::$app->session; $session->open(); $tagsmenu = Yii::$app->cache->getOrSet("tagsmenu",function () use($tmodel){ return $tmodel->find()->rightJoin(['m'=>Tagsfilter::find()], 'm.id = tags.id')->orderBy('sort')->All(); }); //echo $news->text; ?>
'news-form', 'options' => ['class' => 'form-horizontal','enctype' => 'multipart/form-data'],]); //иничиализация DateTimePicker::widget([ 'name' => 'dt_pub', 'options' => [], 'convertFormat' => true, 'pluginOptions' => [ 'format' => 'd-M-Y H:i ', 'startDate' => '01-Mar-2000 12:00', 'todayHighlight' => true ] ]); $tcount = 85; if( mb_strlen( $news->title ) > 85 ){ $tcount = mb_strlen( $news->title ); } $model = new Authors(); $authors = $model->findAll(['active' => 'Y']); //$author = $model->findOne(['id' => $news->author]); $author = $model->getAuthor($news->author); $ids = ArrayHelper::getColumn($authors, 'id'); if( !in_array($author->id, $ids) ){ $authors = array_merge($authors, [$author]); }; $news->commerc = ($news->inscription == 2)?'Y':'N'; $news->mcommerc = ($news->inscription == 1)?'Y':'N'; $news->pcommerc = ($news->inscription == 3)?'Y':'N'; $news->fdzen = ($news['export_rss'] & 1)?'Y':'N'; $news->fmail = ($news['export_rss'] & 2)?'Y':'N'; $nofirst = ($news->flags & 1); if( isset($uuid) ) { $news->uid = $uuid; }else{ $uuid = $news->uid; } if($news->isNewRecord) { ?>
Сгенерировал. UUID
Информация для отладки
ID Новости id?> uid Новости
Информация для отладки
get("editNews_".$news->id) ){ if( isset( unserialize($res)['author'] ) && unserialize($res)['author'] != Yii::$app->user->identity->profile->name){ //Yii::$app->user->identity->profile->name //self /* * Предупреждение о пути истинного */ ?> errors ){ ?>

Обнаружены ошибки

Error
errorSummary($news)?>
uid; $_SESSION['KCFINDER']['admin_news'] = true; ?>
dt_pub ) )?>" name="News[dt_pub]">
'НОВОСТЬ', 1 => 'ВОПРОС ДНЯ', 2 => 'СТАТЬЯ', 3 => 'ИНТЕРВЬЮ', 4 => 'ССЫЛКА', 5 => 'ПОДКАСТ', 6 => 'ЛОНГРИД', 7 => 'ВИДЕО', */?>
field($news, 'title')->textInput([ 'maxlength' => true, 'class' => 'form-control js-word-count-input', 'placeholder' => 'Заголовок новости' ])->label('Заголовок'); _errors:yii\base\Model:private print_a($model->errors); */ ?>
title)?>'>
Поле для альтернативного SEO Title заголовка, если не заполнять совпадёт с основным заголовком
Краткое содержание статьи

Галлереи

isNewRecord):?> Чтобы добавить галлерею сохраните набросок новости
galleries as $gallery){ echo $this->render('@manager/views/news/form/galleryItem',["model"=>$gallery]);} ?>
Новость подготовили

editors)?>

verifed == 'Y')?' checked':''?> value="Y">
noindex == 'Y')?' checked':''?> value="Y">
fdzen == 'Y')?' checked':''?> value="Y">
fmail == 'Y')?' checked':''?> value="Y">
comments == 'N')?' checked':''?> value="N">
value="Y">
photo == 'Y')?' checked':''?> value="Y">
video == 'Y')?' checked':''?> value="Y">
audio == 'Y')?' checked':''?> value="Y">
commerc == 'N' && $news->mcommerc == 'N')?' checked':''?> value="0">
commerc == 'Y')?' checked':''?> value="2">
mcommerc == 'Y')?' checked':''?> value="1">
pcommerc == 'Y')?' checked':''?> value="3">
top == 'Y')?' checked':''?> value="Y">
NH == 'Y')?' checked':''?> value="Y">
NH == 'F')?' checked':''?> value="F">
isNewRecord) { $Tagitems = $tmodel->getForNews($news->id); }else{ $Tagitems = []; } ?>
title?>×

isNewRecord){ ?> Предпросмотр

Локальные копии автосохранение

Фото

id){ $imageSrc = $news->getImage()->geturl(Image::SIZE_1040x586); /* $imageSrc = "/images/news/news/".$news->id."_sizehd.jpg"; if( file_exists( \Yii::getAlias('@webroot').$imageSrc ) === false ){ if( $news->photo_name != '' ){ $imageSrc = $news->photo_name; }else{ $imageSrc = '/img/e.gif'; } } */ $imageSrc .= "?r=".rand(); }else{ $imageSrc = '/img/e.gif'; } ?> 'image', 'file' => 'News[photo]', 'post' => 'cropping', 'aspectRatio' => '16/9']); ?>
SuperTag
id] = true; } foreach( $tagsmenu as $menuitem ){ ?>
id])?' checked':''?>>
Рубрики
isNewRecord) { $model = new NewsTopic(); $Titems = $model->getForNews($news->id); foreach( $Titems as $item ){ $atopic[$item->id] = $item->id; } } ?>

getModels() as $item ){ if( in_array( $item->id, [127,128]) ) continue; // пропустить разделы видео/подкасты if( $item->url == '----' ){ ?>
title?>
id, $atopic, true))?' checked':''?>>

getModels() as $item ){ ?>
id, $atopic, true))?' checked':''?>>

getModels() as $item ){ ?>
id, $atopic, true))?' checked':''?>>
сюжеты
isNewRecord) { $Sitems = $model->getForNews($news->id); }else{ $Sitems = []; } ?>
isNewRecord){ ?>
render('../comments/newsindex', [ 'model' => $news, ]); ?>
render('formSP', [ 'model' => $news, ]); echo $this->render('../top-slider/modalform', ['news'=>$news]); ?>