PHPackages                             viktorals/yii2-modules-news - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. viktorals/yii2-modules-news

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

viktorals/yii2-modules-news
===========================

 module for creating news on the site

123PHP

Since Dec 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ViktorAls/yii2-modules-news)[ Packagist](https://packagist.org/packages/viktorals/yii2-modules-news)[ RSS](/packages/viktorals-yii2-modules-news/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

**Модуль для создания новостей для сайта**

**Установка**
=============

[](#установка)

*Предпочтительный способ установки - composer.*

`php composer.phar require --prefer-dist viktorals/yii2-modules-news "dev-master"`

или добавить

`"viktorals/yii2-modules-news": "*"`

в требуемый раздел вашего composer.json файла.

**Подключение**
===============

[](#подключение)

Добавте: `'modules'=>[  'news'=>[  'class'=>'\viktorals\news\Module',  ],  ],`в файле конфигурации вашего проекта. Для попадания на страницу модуля просто перейдите по ссылке ваш\_сайт/news, предварительно выполнив миграцию, а также не забудьте по Alias.

Для запуска миграции используйте команду php yii migrate/up --migrationPath=@vendor/viktorals/yii2-modules-news/migrations

**Содержание**
==============

[](#содержание)

Модуль состоит из 2-х частей, добавление постов (заголовок, описание, теги, иконка, основные картинки, отображение (черновик, публикация)) и второй части, добавление и редактирование тегов к новости. По умолчанию пути к сохраняем файлам установлен через alias, для этого добавьте их в bootstrap файл в папке config вашего проекта.

`Yii::setAlias('@icon', dirname(dirname(dirname(__DIR__))).'/public_html/uploads/images/posts/icon/'); - иконки Yii::setAlias('@images', dirname(dirname(dirname(__DIR__))).'/public_html/uploads/images/posts/post/');- папки постов`

Папка public\_html - публичная папка проекта. Если папки uploads/images/posts/icon/ или uploads/images/posts/post/ нету, то она будет создана автоматически. В папке проекта лежит файл стилей, для отображения стилей блоков, подключите его к проекту.

Будет создано 5 таблиц:

-ImagesManager - для хранения связанных с постом картинок;

-Post - хранение постов;

-Tag - теги для новостей;

-TagPost - связующая таблица постов и тегов;

-Worker - таблица с информацией о пользователе который опубликовал пост, она связываться со стандартной таблицей user от yii2 по id;

В папке img вашего проекта закинете любой файл noimage.jpg в случаи, если картинку поста удалить, то будет отображена noimage.jpg .

P.S.Первый созданный мной и закинутый на git модуль, не судите строго.

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5585019ca97253b4da8c2b7eb5d82aa749caff5f861b0be47a72dae5cedf382?d=identicon)[ViktorAls](/maintainers/ViktorAls)

---

Top Contributors

[![ViktorAls](https://avatars.githubusercontent.com/u/44008135?v=4)](https://github.com/ViktorAls "ViktorAls (49 commits)")

### Embed Badge

![Health badge](/badges/viktorals-yii2-modules-news/health.svg)

```
[![Health](https://phpackages.com/badges/viktorals-yii2-modules-news/health.svg)](https://phpackages.com/packages/viktorals-yii2-modules-news)
```

###  Alternatives

[alfallouji/php_multithread

iPHP library to handle multi-threading

3231.0k](/packages/alfallouji-php-multithread)[heimrichhannot/contao-encore-bundle

This bundle brings deep integration for symfony encore into contao. On the one hand, your can prepare your bundles to define own webpack entries, which added with just one command to your webpack entries. On the other hand, this bundle allows you to add encore entries only on the pages you need them for optimizing your website performance.

1016.8k](/packages/heimrichhannot-contao-encore-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
