Skip to content

Commit 5f180a9

Browse files
committed
updated README
1 parent 02f6a63 commit 5f180a9

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
1-
Zend Framework 2 module for self-hosted comments.
1+
Zend Framework 2 module for drop-in self-hosted comments.
22

33
#### Installation
44

5+
1. Add the module key to your `composer.json` file
6+
```json
7+
{
8+
"require": {
9+
"robertboloc/rbcomment": "dev-master"
10+
}
11+
}
12+
```
13+
14+
2. Run `composer update`
15+
16+
3. Import the schema from `data/schema.sql` into your database.
17+
18+
4. Add the new module to your application's modules list in `config/application.config.php`
19+
```php
20+
'modules' => array(
21+
'Application',
22+
'RbComment',
23+
),
24+
```
25+
526
#### Usage
27+
28+
In your views use the `rbComment` helper to display the count, the list and a form for adding new comments. Invoke it
29+
where you want your comments box to appear. Simple isn't it? This helper can be used in any view.
30+
31+
```php
32+
<?php echo $this->rbComment($theme) ?>
33+
```
34+
The `$theme` parameter is used to specify the theme of the comments box (if none is specified `default` is used).
35+
36+
Currently, the module is designed to allow only one comment box per page, as it uses
37+
the page uri to identify a thread.
38+
39+
#### Themes
40+
41+
The module comes with 2 themes for now. To implement new ones create a new partial view in `view/theme/yourtheme` using
42+
as base the existing ones.
43+
Use your new theme calling `$this->rbComment('yourtheme')`
44+
45+
##### default
46+
Basic theme with no external dependencies. Contains the minimum styling to make it look decent.
47+
48+
##### uikit
49+
This theme requires the [UIkit](http://www.getuikit.com/) CSS framework. If you use it in your project this theme
50+
will make your comments box look awesome.
51+
52+
#### Configuration
53+
The configuration of the module can be found in `config/module.config.php`. Currently the configurable parameters are:
54+
55+
##### default_visibility
56+
This parameter controls the visibility of the newly published comments. If set to 1 all new published comments will be
57+
visible. If 0 they will not be shown. This is useful for moderation.

0 commit comments

Comments
 (0)