Download the PHP package elephantsgroup/eg-comment without Composer
On this page you can find all versions of the php package elephantsgroup/eg-comment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elephantsgroup/eg-comment
More information about elephantsgroup/eg-comment
Files in elephantsgroup/eg-comment
Informations about the package eg-comment
To use Elephants Group comment module first you must install module, then you can use comment widget anywhere in your website.
Installation Steps:
1) run
php composer.phar require elephantsgroup/eg-comment "*"
or add "elephantsgroup/eg-comment": "*"
to the require section of your composer.json file.
2) migrate database
yii migrate --migratiocommentnPath=vendor/elephantsgroup/eg-comment/migrations
3) add comment module to common configuration (common/config.php file)
4) open access to module in common configuration
5) filter admin controller in frontend configuration (frontend/config.php file)
5) filter ajax controller in backend configuration (backend/config.php file)
Using comment widget
Anywhere in your code you can use comment widget as follows:
You need to use Comments widget header in your page:
Comment widget parameters
- item (integer): to separate comments between different items.
default value for item is 0
- service (integer): to separate comments between various item types.
for example you can use different values for different modules in your app, and then use comment widget separately in modules. default value for service is 0
-
enabled_name (boolean): show name in comment form or not, default true
-
enabled_subject (boolean): show subject in comment form or not, default true
-
enabled_description (boolean): show description in comment form or not, default true
- view_file (string): the view file path for rendering
you can use these variables in your customized view:
- service
- item
- enabled_name
- enabled_subject
- enabled_description