elitedivision/amos-comments
Comments for contents - plugin
Requires
- php:>=5.4.0
- elitedivision/amos-core:^1.9.60
- elitedivision/amos-admin:>=1.7
- elitedivision/amos-attachments:^1.1.9
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 1.11.1
- 1.11.0
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.0
- 1.6.0
- 1.4.0
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- dev-test/1.17.3/1
- dev-gianluca/1.17.2/1
- dev-test/1.17.2/1
- dev-gianluca/1.14.1/2
- dev-test/1.14.3/1
- dev-gianluca/1.17.0/2
- dev-test/1.17.1/1
- dev-filippo/1.17.0/2
- dev-test/1.17.0/2
- dev-dof/new-community-2024
- dev-test/1.17.0/1
- dev-test/1.16.0/1
- dev-gianluca/1.15.1/1
- dev-test/1.15.2/1
- dev-test/1.15.1/1
- dev-gianluca/1.14.1/1
- dev-test/1.14.1/1
- dev-test/1.14.2/1
- dev-test/1.15.0/1
- dev-riccardo/1.15.0/1
- dev-fabiano/1.14.1/1
- dev-rc/1.11.1/1
- dev-dof/1.8.1/1
- dev-test/1.8.1/2
- dev-dof/1.8.0/1
- dev-test/1.8.0/3
- dev-dof/1.14.0/1
- dev-test/1.14.0/1
- dev-gianluca/1.11.2/2
- dev-MarcoBoselliTest/1.13.1/1
- dev-michele-barillani/1.13.1/1
- dev-fabiano/1.13.0/1
- dev-test/1.13.1/1
- dev-fabiano/1.12.0/1
- dev-test/1.12.1/1
- dev-test/1.13.0/1
- dev-test/1.12.0/1
- dev-dof/1.13.0/1
- dev-cesari/1.12.0/1
- dev-MarcoBoselli_test/1.12.0/1
- dev-fabiano/1.11.2/2
- dev-fabiano/1.11.2/1
- dev-test/1.11.2/2
- dev-test/1.11.2/1
- dev-test/1.8.1/1
- dev-gianluca/1.8.0/2
- dev-test/1.11.1/1
- dev-fabiano/1.11.0/1
- dev-test/1.11.0/1
- dev-scarface_piattelite/test/1.10.1/4
- dev-test/1.10.1/4
- dev-fabiano/1.10.1/4
- dev-cesari/1.10.1/3
- dev-test/1.10.1/3
- dev-cesari/1.10.0/1
- dev-fabiano/1.10.1/2
- dev-daniele/1.10.1/2
- dev-test/1.10.1/2
- dev-test/1.10.1/1
- dev-daniele/1.10.0/2
- dev-test/1.10.0/1
- dev-dof/1.10.0/1
- dev-dof/1.9.3/3
- dev-cesari/1.9.3/3
- dev-test/1.9.3/3
- dev-stefanob/1.9.3/1
- dev-test/1.9.3/2
- dev-mirko/1.1.15/1
- dev-mirko/1.9.3/2
- dev-test/1.9.3/1
- dev-gianluca/1.9.1/3
- dev-test/1.9.1/3
- dev-test/1.9.2/1
- dev-riccardo/1.9.1/2
- dev-test/1.9.1/2
- dev-gianluca/1.9.0/1
- dev-gianluca/1.0.0/1
- dev-risorsecomuni/1.3.0
- dev-intranet-aria/1.9.1/1
- dev-riccardo/1.9.0/1
- dev-test/1.9.1/1
- dev-test/1.3.3/1
- dev-test/1.9.0/1
- dev-francesca/1.9.0/1
- dev-daniele/1.3.2
- dev-test/1.3.2/1
- dev-daniele/1.3.1/5
- dev-dof/1.9.0/1
- dev-test_merge_1.9.0
- dev-daniele/1.9.0/2
- dev-test/1.3.1/5
- dev-michelezucchini/1.3.0/1
- dev-test/1.3.1/4
- dev-michelezucchini/1.3.1/4
- dev-michelezucchini/1.3.1/3
- dev-test/1.3.1/3
- dev-mattia-arter/1.3.1/1
- dev-test/1.3.1/2
- dev-test/1.8.0/2
- dev-dof/1.8.0/2
- dev-la_francesca/befe
- dev-test/1.8.0/1
- dev-riccardo/1.7.0
- dev-test/1.7.0
- dev-riccardo/1.6.0
- dev-test/1.6.0
- dev-test/1.5.0
- dev-open20/1.3.0/1
- dev-riccardo/1.4.0
- dev-dof-test
- dev-la_francesca/1.3.0
- dev-test/1.4.0
- dev-test/1.3.0
- dev-test/1.3.1/1
- dev-riccardo-test
- dev-bootstrap_italia
- dev-scarface
- dev-aster_1.2.0
- dev-test/1.2.1
- dev-riccardo/1.1.14/1
- dev-test/1.2.0
- dev-test/1.1.14/1
- dev-la_francesca/nuova_grafica_notitche
- dev-la_francesca/1.1.13/1
- dev-POI_TEST/1.1.13/1
- dev-test/1.1.13/1
- dev-open20_pr337
- dev-cruscotto_lavoro
- dev-test/1.1.11/1
- dev-grafica-new
- dev-arca/1.1.10/1
- dev-fabiot
- dev-test/1.1.9/1
- dev-la_francesca/1.1.8/1
- dev-la_francesca/1.1.9/1
- dev-riccardo/1.1.9/1
- dev-riccardo/1.1.8/1
- dev-test/1.1.8/1
- dev-DEPLOY_POI_20180921
- dev-la_francesca/1.1.7/1
- dev-test/1.1.7/1
- dev-riccardo/1.1.5/4
- dev-cinzia
- dev-DEPLOY_POI_20180702
- dev-test/1.1.5/4
- dev-simonem/1.1.5/4
- dev-luca_l/1.1.5/4
- dev-la_francesca/1.1.5/4
- dev-test/1.1.5/3
- dev-la_francesca/1.1.5/3
- dev-la_francesca/1.1.5/2
- dev-giuseppe_1.1.5
- dev-michelez/master
- dev-test/1.1.5/2
- dev-test/1.1.5/1
- dev-test/1.1.4/1
- dev-la_francesca/1.1.2/1
- dev-test/1.1.2/1
- dev-pivanti
- dev-test/1.1/16
- dev-test/1.1/15
- dev-test/1.1/14
- dev-test/1.1/13
- dev-test/1.1/12
- dev-test/1.1/11
- dev-test/1.1/10
- dev-test/1.1/9
- dev-test/1.1/8
- dev-fabiot_1.1
- dev-test/1.1/7
- dev-test/1.1/6
- dev-test/1.1/5
- dev-test/1.1/4
- dev-test/1.1/3
- dev-pivanti_1.1/2
- dev-test/1.1/2
- dev-test/1.1/1
- dev-test/1.0/1
README
Extension for comment a content like news, events, etc...
Installation
1 The preferred way to install this extension is through composer.
Either run
composer require elitedivision/amos-comments
or add this row
"elitedivision/amos-comments": "dev-master"
to the require section of your composer.json
file.
2 Add module to your main config in backend:
<?php
'modules' => [
'comments' => [
'class' => 'elitedivision\amos\comments\AmosComments',
'modelsEnabled' => [
/**
* Add here the classnames of the models where you want the comments
* (i.e. 'elitedivision\amos\events\models\Event')
*/
],
// the following are mandatory fields
'displayNotifyCheckbox' => true, // if the notify checkbox in the accordion must be shown (if hidden, the notify checkbox is selected)
'accordionOpenedByDefault' => false, // if the accordion must be opened by default
],
],
Also, add these lines to your bootstrap:
<?php
'bootstrap' => [
'comments',
],
3 Add the view component to your main config in common:
<?php
'components' => [
'view' => [
'class' => 'elitedivision\amos\core\components\AmosView',
],
],
4 Apply migrations
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-comments/src/migrations
or add this row to your migrations config in console:
<?php
return [
'@vendor/elitedivision/amos-comments/src/migrations',
];
5 Implement the CommentInterface in your model
<?php
use elitedivision\amos\comments\models\CommentInterface;
/**
* Implement the CommentInterface
*/
class MyClass implements CommentInterface
/**
* Add the required method that must return boolean
*/
public function isCommentable()
{
return true;
}
6 Add your model to the modulesEnables in the module config in backend/config/main.php
<?php
'modules' => [
'comments' => [
'class' => 'elitedivision\amos\comments\AmosComments',
'modelsEnabled' => [
'class_namespace\MyClass'
]
],
],
7 disable mail notifications
<?php
'modules' => [
'comments' => [
'class' => 'elitedivision\amos\comments\AmosComments',
'enableMailsNotification' => false,
'modelsEnabled' => [
'class_namespace\MyClass'
]
],
],
*htmlMailContent - string/array
change the content of the mail of notification when you insert a comment
you can insert an array
'comments' => [
'htmlMailContent' => [
'elitedivision\amos\news\models\News' => '@backend/mail/comment/content_news',
'elitedivision\amos\discussioni\models\DiscussioniTopic' => '@backend/mail/comment/content_discussioni',
'elitedivision\amos\documenti\models\Documenti' => '@backend/mail/comment/content_documenti'
],
or a string if the conente is valid for all contents(news/discussioni/docuemnts/ecc..)
'comments' => [
'htmlMailContent' => '@backend/mail/comment/content_news'
]
enableCommentOnlyWithScope
*enableCommentOnlyWithScope - boolean default false
If true it enable the comments olny with the scope (in the community)
'comments' => [
'enableCommentOnlyWithScope' => true,
]