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 today

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 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

[jyxon/gdpr-cookie-compliance

A library to comply with the GDPR law.

5848.5k](/packages/jyxon-gdpr-cookie-compliance)[umpirsky/composer-permissions-handler

Composer script handling directories permissions by making them writable both by the web server and the command line user.

6630.3k](/packages/umpirsky-composer-permissions-handler)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)[dktapps/pmforms

Form API library for PocketMine-MP plugins

522.3k1](/packages/dktapps-pmforms)[hexadog/laravel-menus-manager

Dynamic Menus Management package for your Laravel application

184.5k](/packages/hexadog-laravel-menus-manager)[melios/page-builder

Improvements for the built-in Magento PageBuilder module

131.4k](/packages/melios-page-builder)

PHPackages © 2026

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