PHPackages                             cinghie/yii2-articles - 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. [Framework](/categories/framework)
4. /
5. cinghie/yii2-articles

ActiveYii2-extension[Framework](/categories/framework)

cinghie/yii2-articles
=====================

Yii2 Articles to create, manage, and delete articles in a Yii2 site.

0.6.6(7y ago)333.0k18[7 issues](https://github.com/cinghie/yii2-articles/issues)BSD-3-ClausePHP

Since May 22Pushed 3mo ago8 watchersCompare

[ Source](https://github.com/cinghie/yii2-articles)[ Packagist](https://packagist.org/packages/cinghie/yii2-articles)[ Docs](https://github.com/cinghie/yii2-articles)[ RSS](/packages/cinghie-yii2-articles/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (14)Used By (0)

Yii2 Articles
=============

[](#yii2-articles)

[![License](https://camo.githubusercontent.com/752abd9fa9e3bdc2c5a4c6555c7ee3c2f1f2e3e8fecc18cd2fdfae87cd362424/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63696e676869652f796969322d61727469636c65732e737667)](https://camo.githubusercontent.com/752abd9fa9e3bdc2c5a4c6555c7ee3c2f1f2e3e8fecc18cd2fdfae87cd362424/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63696e676869652f796969322d61727469636c65732e737667)[![Latest Stable Version](https://camo.githubusercontent.com/a2a245df18814d1859ca68cc039322344bfbeb9143d986908f13fc157f80ebd2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f63696e676869652f796969322d61727469636c65732e737667)](https://camo.githubusercontent.com/a2a245df18814d1859ca68cc039322344bfbeb9143d986908f13fc157f80ebd2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f63696e676869652f796969322d61727469636c65732e737667)[![Latest Release Date](https://camo.githubusercontent.com/c23a0ba9e7933030177ebb233e78645f98e3c745818e943db0e048064e1fbbb9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f63696e676869652f796969322d61727469636c65732e737667)](https://camo.githubusercontent.com/c23a0ba9e7933030177ebb233e78645f98e3c745818e943db0e048064e1fbbb9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f63696e676869652f796969322d61727469636c65732e737667)[![Latest Commit](https://camo.githubusercontent.com/392ad41a219cc4d8ec288ceb18a1a4233f97d5d988bd2a70f8bbbc4dff2ecc46/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f63696e676869652f796969322d61727469636c65732e737667)](https://camo.githubusercontent.com/392ad41a219cc4d8ec288ceb18a1a4233f97d5d988bd2a70f8bbbc4dff2ecc46/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f63696e676869652f796969322d61727469636c65732e737667)[![Total Downloads](https://camo.githubusercontent.com/fabe487c8193c3e84951a81303bc33999d54eae240deeb3386d2d27c3e10f7d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63696e676869652f796969322d61727469636c65732e737667)](https://packagist.org/packages/cinghie/yii2-articles)

Yii2 Articles to create, manage, and delete articles in a Yii2 site.

- Create, edit and delete articles
- Article with attachments, image, gallery, hits
- Manage categories and subcategories
- Advanced Access Permission
- Approval
- Multi-Language with I18N
- Extra Field Management
- SEO Optimization

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require cinghie/yii2-articles "*"

```

or add

```
"cinghie/yii2-articles": "*"

```

Configuration
-------------

[](#configuration)

### 1. Images folder

[](#1-images-folder)

Copy img folder to your webroot

### 2. Update yii2 articles database schema

[](#2-update-yii2-articles-database-schema)

Make sure that you have properly configured `db` application component.
Make sure that you have an user with id=1.
Run the following command:

```
$ php yii migrate/up --migrationPath=@vendor/cinghie/yii2-articles/migrations

```

### 3. Set configuration file

[](#3-set-configuration-file)

Set on your configuration file, in modules section

```
'modules' => [

	// Module Articles
	'articles' => [
		'class' => 'cinghie\articles\Articles',
		'userClass' => 'dektrium\user\models\User',

		// Select Languages allowed
		'languages' => [
			"it-IT" => "it-IT",
			"en-GB" => "en-GB"
		],
		// Select Default Language
		'languageAll' => 'it-IT',

		// Select Date Format
		'dateFormat' => 'd F Y',

		// Select Editor: no-editor, ckeditor, imperavi, markdown, tinymce
		'editor' => 'ckeditor',

		// Select Path To Upload Category Image
		'categoryImagePath' => '@webroot/img/articles/categories/',
		// Select URL To Upload Category Image
		'categoryImageURL'  => '@web/img/articles/categories/',
		// Select Path To Upload Category Thumb
		'categoryThumbPath' => '@webroot/img/articles/categories/thumb/',
		// Select URL To Upload Category Image
		'categoryThumbURL'  => '@web/img/articles/categories/thumb/',

		// Select Path To Upload Item Image
		'itemImagePath' => '@webroot/img/articles/items/',
		// Select URL To Upload Item Image
		'itemImageURL' => '@web/img/articles/items/',
		// Select Path To Upload Item Thumb
		'itemThumbPath' => '@webroot/img/articles/items/thumb/',
		// Select URL To Upload Item Thumb
		'itemThumbURL' => '@web/img/articles/items/thumb/',

		// Select Path To Upload Attachments
		'attachPath' => '@webroot/attachments/',
		// Select URL To Upload Attachment
		'attachURL' => '@web/img/articles/items/',
		// Select Image Types allowed
		'attachType' => ['jpg','jpeg','gif','png','csv','pdf','txt','doc','docs'],

		// Select Image Name: categoryname, original, casual
		'imageNameType' => 'categoryname',
		// Select Image Types allowed
		'imageType' => ['png','jpg','jpeg'],
		// Thumbnails Options
		'thumbOptions'  => [
			'small'  => ['quality' => 100, 'width' => 150, 'height' => 100],
			'medium' => ['quality' => 100, 'width' => 200, 'height' => 150],
			'large'  => ['quality' => 100, 'width' => 300, 'height' => 250],
			'extra'  => ['quality' => 100, 'width' => 400, 'height' => 350],
		],

		// Slugify Options
		$slugifyOptions = [
		    'separator' => '-',
		    'lowercase' => true,
		    'trim' => true,
		    'rulesets'  => [
		        'default'
		    ]
		],

		// Show Titles in the views
		'showTitles' => true,
		],
	],

]

```

### 4. Other Configurations

[](#4-other-configurations)

To use easily this extension is strongly recommended install and config dektrium/yii2-user to manage user

[Installation](https://github.com/dektrium/yii2-user/blob/master/docs/getting-started.md)
[Configuration](https://github.com/dektrium/yii2-user/blob/master/docs/configuration.md)

and dektrium/yii2-rbac to manage auth permission

[Installation](https://github.com/dektrium/yii2-rbac/blob/master/docs/installation.md)

### 5. Add your User as admin

[](#5-add-your-user-as-admin)

```
INSERT INTO `PREFIX_auth_assignment` (`item_name`, `user_id`, `created_at`) VALUES
('admin', 'YUOR_USER_ID', 1451514052);

```

Override PREFIX\_ with your tables prefix and YUOR\_USER\_ID with your user\_id. For example:

```
INSERT INTO `auth_assignment` (`item_name`, `user_id`, `created_at`) VALUES
('admin', '1', 1451514052);

```

### Advanced Template Recommended Configuration

[](#advanced-template-recommended-configuration)

[Advanced Template recommended configuration](docs/advanced-template-recommended-configuration.md)

URL Rules
---------

[](#url-rules)

```
'components' => [

    // Url Manager
    'urlManager' => [
	'class' => 'codemix\localeurls\UrlManager',
	// All languages including the default language
	'languages' => ['it', 'en'],
	// The default language is now treated like any other configured language
	'enableDefaultLanguageUrlCode' => true,
        // Disable index.php
        'showScriptName' => false,
        // Disable r= routes
        'enablePrettyUrl' => true,
        // Disable site/ from the URL
        'rules' => [
            '' => 'site/',
	    '/' => 'articles/categories/view',
	    '//' => 'articles/items/view',
	    '//' => 'articles/tags/view'
        ],
     ],

],

```

Filters
-------

[](#filters)

If you have a Yii2 App Advanced (frontend/backend) you can exclude frontend actions

```
'modules' => [

	'articles' => [
		'class' => 'cinghie\articles\Articles',
		'as frontend' => 'cinghie\articles\filters\FrontendFilter',
	]

],

```

Overrides
---------

[](#overrides)

Override controller example, on modules config

```
'modules' => [

	'articles' => [
		'class' => 'cinghie\articles\Articles',
		'controllerMap' => [
			'items' => 'app\controllers\MyItemsController'
		]
	]

],

```

Override models example, on modules config

```
'modules' => [

	'articles' => [
		'class' => 'cinghie\articles\Articles',
		'modelMap' => [
			'Items' => 'app\models\MyItemsModel'
		]
	]

],

```

Override view example, on components config

```
'components' => [

	'view' => [
		'theme' => [
			'pathMap' => [
				'@cinghie/articles/views/items' => '@app/views/articles/items',
			],
		],
	],

],

```

Override examples can be found on overrides folder

Users Auth
----------

[](#users-auth)

### Articles Permissions

[](#articles-permissions)

createpublishupdatedeleteindexviewadminyesallallallyesyeseditoryesallallhisyesyespublisheryeshishisnohisyesauthoryesnohisnohisyes### Categories Permissions

[](#categories-permissions)

createpublishupdatedeleteindexviewadminyesyesyesyesyesyeseditoryesnoyesnoyesyespublishernonononoyesyesauthornonononoyesyes### Tags Permissions

[](#tags-permissions)

createpublishupdateindexdeleteadminyesyesyesyesyeseditoryesyesyesyesyespublisheryesyesyesyesnoauthoryesnononono### Users Types

[](#users-types)

The migrations add to the database 4 types of users:

1. Admin:
    - Can Create Categories
    - Can Publish Categories
    - Can Delete Categories
    - Can Update Categories
    - Can Index Categories
    - Can Create Articles
    - Can Publish all Articles
    - Can Update all Articles
    - Can Delete all Articles
    - Can Index all Articles
    - Can View all Articles
    - Can Create Tags
    - Can Publish Tags
    - Can Delete Tags
    - Can Update Tags
    - Can Index Tags
2. Editor:
    - Can Create Categories
    - Can't Publish Categories
    - Can't Delete Categories
    - Can Update Categories
    - Can Index Categories
    - Can Create Articles
    - Can Publish his Articles
    - Can Update all Articles
    - Can Delete his Articles
    - Can Index Articles
    - Can View all Articles
    - Can Create Tags
    - Can Publish Tags
    - Can Delete Tags
    - Can Update Tags
    - Can Index Tags
3. Publisher:
    - Can't Create Categories
    - Can't Publish Categories
    - Can't Delete Categories
    - Can't Update Categories
    - Can Index Categories
    - Can Create Articles
    - Can Publish his Articles
    - Can Update his Articles
    - Can Delete his Articles
    - Can Index his Articles
    - Can View all Articles
    - Can Create Tags
    - Can Publish Tags
    - Can Update Tags
    - Can Index Tags
4. Author:
    - Can't Create Categories
    - Can't Publish Categories
    - Can't Delete Categories
    - Can't Update Categories
    - Can Index Categories
    - Can Create Articles
    - Can't Publish his Articles
    - Can Update his Articles
    - Can't Delete Articles
    - Can't Index Articles
    - Can View Articles
    - Can Create Tags

LINKS
-----

[](#links)

- Admin Panel: PathToApp/index.php?r=articles
- Admin Panel with Pretty Urls: PathToApp/articles
- Categories: PathToApp/index.php?r=articles/categories
- Categories with Pretty Urls: PathToApp/articles/categories
- Items: PathToApp/index.php?r=articles/items
- Items with Pretty Urls: PathToApp/articles/items
- Attachments: PathToApp/index.php?r=articles/attachments
- Attachments with Pretty Urls: PathToApp/articles/attachments
- Tags: PathToApp/index.php?r=articles/tags
- Tags with Pretty Urls: PathToApp/articles/tags

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance49

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 99.8% 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.

###  Release Activity

Cadence

Every ~120 days

Recently: every ~290 days

Total

13

Last Release

2558d ago

### Community

Maintainers

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

---

Top Contributors

[![cinghie](https://avatars.githubusercontent.com/u/2445152?v=4)](https://github.com/cinghie "cinghie (566 commits)")[![quato](https://avatars.githubusercontent.com/u/3704768?v=4)](https://github.com/quato "quato (1 commits)")

---

Tags

yii2-blogyii2 articlesyii2 contentsyii2 categoryyii2 attachmentsyii2 tag

### Embed Badge

![Health badge](/badges/cinghie-yii2-articles/health.svg)

```
[![Health](https://phpackages.com/badges/cinghie-yii2-articles/health.svg)](https://phpackages.com/packages/cinghie-yii2-articles)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k46](/packages/skeeks-cms)[akiraz2/yii2-blog

Simple, configurable blog module for Yii2 (post, comment, nested category, tags). + frontend, backend. + SEO! (Opengraph, Schema.org)

906.7k](/packages/akiraz2-yii2-blog)

PHPackages © 2026

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