Giter Club home page Giter Club logo

yii2-articles's Introduction

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

The preferred way to install this extension is through composer.

Either run

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

or add

"cinghie/yii2-articles": "*"

Configuration

1. Images folder

Copy img folder to your webroot

2. Update yii2 articles database schema

Make sure that you have properly configured db application component and run the following command:

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

3. Set configuration file

Set on your configuration file, in modules section

'modules' => [ 

	// Module Articles
	'articles' => [
		'class' => 'cinghie\articles\Articles',
		
		// Select Languages allowed
		'languages' => [ 
			"it-IT" => "it-IT", 
			"en-GB" => "en-GB" 
		],			
		
		// Select Editor: no-editor, ckeditor, imperavi, tinymce, markdown
		'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 Image Name: categoryname, original, casual
		'imageNameType' => 'categoryname',
		// Select Image Types allowed
		'imageType'     => 'jpg,jpeg,gif,png',
		// 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],
		],
	],	
	
	// Module Kartik-v Grid
	'gridview' =>  [
		'class' => '\kartik\grid\Module',
	],
	
	// Module Kartik-v Markdown Editor
	'markdown' => [
		'class' => 'kartik\markdown\Module',
	],

]

Advanced Template Recommended Configuration

Advanced Template recommended configuration

Users Auth

Articles Permissions

create publish update delete index view
admin yes all all all yes yes
editor yes all all his yes yes
publisher yes his his no his yes
author yes no his no his yes

Categories Permissions

create publish update delete index view
admin yes yes yes all yes yes
editor yes no yes no yes yes
publisher no no no no yes yes
author no no no no yes yes

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
  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
  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
  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

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

CHANGELOG

  • Version 0.4.1 - Update RBAC functions
  • Version 0.4.0 - Adding first RBAC functions
  • Version 0.3.1 - Adding image to categories view
  • Version 0.3.0 - Deny to not logged to index, create, update, delete; only view permitted
  • Version 0.2.7 - Update Articles Params
  • Version 0.2.6 - Update Migrations
  • Version 0.2.5 - Update Asset Depends
  • Version 0.2.4 - Update Italian Translations
  • Version 0.2.3 - Update Asset setting articles.css after bootstrap
  • Version 0.2.2 - Update Item View
  • Version 0.2.1 - Adding video_type field in Items and fixed modified
  • Version 0.2.0 - Adding Upload Image in Items
  • Version 0.1.14 - Cleaning Categories Code
  • Version 0.1.13 - Generalizing Upload File Field
  • Version 0.1.12 - Adding Migrations Example
  • Version 0.1.11 - Fixing Delete Image in Categories
  • Version 0.1.10 - Adding Admin Menù
  • Version 0.1.9 - Adding Attachment's Files
  • Version 0.1.8 - Refactoring Categories Upload Image
  • Version 0.1.7 - Fixing TinyMCE problems
  • Version 0.1.6 - Adding Imperavi Redactor as Editor in Categories and Items
  • Version 0.1.5 - Update Item Created and Modified
  • Version 0.1.4 - Adding Item Variables in Module
  • Version 0.1.3 - Refactoring Module Variables
  • Version 0.1.2 - Added Facebook and Twitter Item View
  • Version 0.1.1 - Added Attachment's Table in database
  • Version 0.1.0 - Refactoring Project
  • Version 0.0.7 - Added Image Upload for Categories
  • Version 0.0.6 - Added Composer
  • Version 0.0.5 - Fixed problem with Upload Image
  • Version 0.0.4 - Added editors ckeditor, tinymce, markdown from other Packages
  • Version 0.0.3 - Various Fix and Update for Categories Views
  • Version 0.0.2 - Added multi-language with I18N
  • Version 0.0.1 - Initial Releases

LIBRARIES NEEDED

yii2-articles's People

Contributors

cinghie avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.