2017 © Pedro Peláez
 

yii2-extension yii2-mforum

forum module extension for yii2

image

kriptograf/yii2-mforum

forum module extension for yii2

  • Wednesday, December 7, 2016
  • by kriptograf
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 11 % Grown

The README.md

yii2 forum

forum module extension for yii2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer require --prefer-dist kriptograf/yii2-mforum "*"

or add, (*4)

"kriptograf/yii2-mforum": "*"

to the require section of your composer.json file., (*5)

Configure

Add following lines to your main configuration file:, (*6)

'modules' => [
    ...
    'forum' => [
        'class' => 'kriptograf\mforum\Module',
        'defaultRoute'=>'forum/index'
    ],
    //depends extensions
    'markdown' => [
        'class' => 'kartik\markdown\Module',
    ],
    'attachments' => [
        'class' => nemmo\attachments\Module::className(),
        'tempPath' => '@app/uploads/temp',
        'storePath' => '@app/uploads/store',
        'rules' => [ // Rules according to the FileValidator
            'maxFiles' => 10, // Allow to upload maximum 3 files, default to 3
            'mimeTypes' => 'image/png', // Only png images
            'maxSize' => 1024 * 1024 // 1 MB
        ],
        'tableName' => '{{%attachments}}' // Optional, default to 'attach_file'
    ]
    ... 
 ]

Add sender information to common/params.php, (*7)

'forumEmailSender'=>'info@yousite.com',

Update database schema

The last thing you need to do is updating your database schema by applying the migrations. Make sure that you have properly configured db application component and run the following command:, (*8)

$ php yii migrate/up --migrationPath=@vendor/kriptograf/yii2-mforum/migrations
$ php yii migrate/up --migrationPath=@vendor/nemmo/yii2-attachments/src/migrations

Usage

Once the extension is installed, simply use it in your code by :, (*9)

php <?= Url::toRoute(['/forum']); ?>, (*10)

The Versions

07/12 2016

dev-master

9999999-dev

forum module extension for yii2

  Sources   Download

MIT

The Requires

 

by Avatar kriptograf

extension yii2 forum