maks757 / yii2-articles
此包的最新版本(0.7.01)没有提供许可证信息。
Yii 框架的文章扩展
0.7.01
2016-11-07 16:52 UTC
Requires
- php: >=5.4.0
- 2amigos/yii2-tinymce-widget: *
- black-lamp/yii2-seo: *
- maks757/yii2-multi-lang: *
- yii2tech/ar-position: *
- yiisoft/yii2: >=2.0.4
- yiisoft/yii2-bootstrap: *
README
安装
Composer 需求部分
"black-lamp/yii2-articles": "0.*"
迁移
php yii migrate --migrationPath=@yii/rbac/migrations
php yii migrate --migrationPath=@vendor/black-lamp/yii2-multi-lang/migration
php yii migrate --migrationPath=@vendor/black-lamp/yii2-articles/common/migrations
php yii migrate --migrationPath=@vendor/black-lamp/yii2-seo/migrations
将文章模块添加到您的后端配置
'modules' => [ ... 'articles' => [ 'class' => 'bl\articles\backend\Module' ], ... ]
将文章模块添加到您的前端配置
'modules' => [ ... 'articles' => [ 'class' => 'bl\articles\frontend\Module' ], ... ]
配置 SEO-URL 规则
'urlManager' => [ ... 'rules' => [ ... [ 'class' => 'bl\articles\UrlRule' ] ] ]
配置 Imagable 模块
'components' => [ ... 'articles_imagable' => [ 'class' => bl\imagable\Imagable::className(), 'imageClass' => CreateImageImagine::className(), 'nameClass' => bl\imagable\name\CRC32Name::className(), 'imagesPath' => '@frontend/web/images', 'categories' => [ 'origin' => false, 'category' => [ 'thumbnail' => [ 'origin' => false, 'size' => [ 'big' => [ 'width' => 1500, 'height' => 500 ], 'thumb' => [ 'width' => 500, 'height' => 500, ], 'small' => [ 'width' => 150, 'height' => 150 ] ] ], 'menu_item' => [ 'origin' => false, 'size' => [ 'big' => [ 'width' => 1500, 'height' => 500 ], 'thumb' => [ 'width' => 500, 'height' => 500, ], 'small' => [ 'width' => 150, 'height' => 150 ] ] ], 'social' => [ 'origin' => true, 'size' => [ 'big' => [ 'width' => 1500, 'height' => 500 ], 'thumb' => [ 'width' => 500, 'height' => 500, ], 'small' => [ 'width' => 150, 'height' => 150 ] ] ], ] ] ], ]
使用
yourbackend.url/articles/article
**YOU MUST CONFIGURE IMAGABLE COMPONENT**
角色及其权限
articleManager
- viewArticleList
- editArticles
- deleteArticles
articleCategoryManager
- viewCategoryList
- editCategories
- deleteCategories
articleAdministrator 扩展了类别和文章管理员的权限。