Skip to content

itsurka/yii2-simple-comment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Comment

UNDER DEVELOPING! DO NOT USE IN PRODUCTION!

A simple comment extension.

Installation

  1. Download extension

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist itsurka/yii2-simple-comment "*"

or add

"itsurka/yii2-simple-comment": "*"

to the require section of your composer.json file.

  1. Apply migrations from yii2-simple-comment/migrations folder.

Usage

Once the extension is installed, simply use it in your code by :

<?= SimpleComment::widget([
    'model'                => $model, // AR model for which will be displayed the comments widget.
    'author'               => $user, // AR model - comments author.
    'authorNameAttribute'  => 'username', // AR models name attribute.
    'authorNameAttribute'  => 'avatarUrl', // Avatar URL. Use this or $authorAvatarFunction param.
    'authorAvatarFunction' => 'getAvatarUrl', // To get avatar URL. Use this or $authorAvatarAttribute param.
    'authorAvatarWidth'    => '100',
    'authorAvatarHeight'   => '100',
]) ?>```

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages