Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
akkaweb committed Nov 21, 2016
1 parent 888fa95 commit af7aa32
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NOTE: Sliiide jQuery Plugin is also needed, but it is included and loaded by the

##### Composer

1. Run the following Composer command from the root of your application
### Run the following Composer command from the root of your application

```php composer.phar require akkaweb/cakephp-feedback```

Expand All @@ -36,7 +36,7 @@ Or Add the following to your `composer.json` file located in the root of your ap
}
```

2. Then run the following command at the root of your application
### Then run the following command at the root of your application

```
php composer.phar update
Expand All @@ -45,7 +45,7 @@ Note: if `composer.phar` is not found, you need to install it. Follow CakePHP's

## Configuration #######################################################

1. Load the plugin in your application's `bootstrap.php` file:
### Load the plugin in your application's `bootstrap.php` file:

Using command-line

Expand All @@ -57,22 +57,22 @@ or
Plugin::load('AkkaFeedback', ['bootstrap' => false, 'routes' => true]);
```

2. Schema Migrations
### Schema Migrations

This Feedback plugin uses the `feedbacks` database table to save feedbacks. Please use the following command to run the migrations file included

```bin/cake migrations migrate -p AkkaFeedback```

If you would rather create this table directly using phpMyAdmin, Workbench or other Database Tools, you can use the file provided in `AkkaFeedback/config/Schema/feedback.sql`

3. Load the plugin's helper in `src/View/AppView.php` inside the `initialize()` hook method
### Load the plugin's helper in `src/View/AppView.php` inside the `initialize()` hook method

```php
parent::initialize();
$this->loadHelper('AkkaFeedback.Feedback');
```

4. Add Default Element to your Layout file
### Add Default Element to your Layout file

Add the following to the bottom of your layout file right before the end body tag `</body>`

Expand All @@ -85,14 +85,15 @@ NOTE: You need to ensure the following is also added within the <head> tag of yo
<?= $this->fetch('script') ?>
```

5. Adding reCaptacha to Forms
### Adding reCaptacha to Forms

To enabled reCaptacha in your forms, you need to add the following to application bootstrap files. ie. `bootstrap.php`.

```Configure::write('Feedbacks.reCaptcha.enable', true); //to enable reCatpcha login```
```Configure::write('Feedbacks.reCaptcha.key', 'xxxxxxxxxxxxxxxxxxxx'); //reCatpcha key```
```Configure::write('Feedbacks.reCaptcha.secret', 'xxxxxxxxxxxxxxxxxxxx'); //reCatpcha secret```


At this point the default Feedback Form will start showing on your site.

If you would like a different form, you can copy this element, make the necessary changes and create a new element in your application's Element folder
Expand Down

0 comments on commit af7aa32

Please sign in to comment.