Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit b7537c0

Browse files
author
Florian Krämer
committed
Updating the docs
1 parent f64a929 commit b7537c0

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

docs/Installation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@ Using Composer
77
Installing the plugin via [Composer](https://getcomposer.org/) is very simple, just run this in your project folder:
88

99
```sh
10-
composer require burzum/cakephp-html-purifier:3.0.*@dev
10+
composer require burzum/cakephp-html-purifier:~2.0
11+
```
12+
13+
In your `config/bootstrap.php`
14+
15+
```php
16+
Plugin::load('Burzum/HtmlPurifier.HtmlPurifier');
1117
```

docs/Usage.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Usage
1+
Usage
2+
=====
23

3-
### If you use APC ...
4+
If you use APC ...
5+
------------------
46

57
...and get this error message
68

@@ -9,18 +11,19 @@
911
you can fix this by adding
1012

1113
```php
12-
Configure::write(''HtmlPurifier.standalone', true);
14+
Configure::write('HtmlPurifier.standalone', true);
1315
```
1416

1517
to your bootstrap.php *before* you load this plugin.
1618

1719
This line will use a compacted one file version of Html Purifier. This is an official and know issue and workaround, see http://htmlpurifier.org/phorum/read.php?3,4099,6680.
1820

19-
### Configuration
21+
Configuration
22+
-------------
2023

2124
Important: Before you start declaring a configuration you should lookup how HTML Purifier can be configured. http://htmlpurifier.org/docs
2225

23-
In app/Config/boostrap.php you can either set the purifier config as an array or pass a native config object.
26+
In `config/boostrap.php` you can either set the purifier config as an array or pass a native config object.
2427

2528
The array style would look like this:
2629

@@ -68,11 +71,11 @@ For some automatization you can also use the Behavior or Helper.
6871

6972
### Caching ###
7073

71-
It is recommended to change the path of the purifier libs cache to your APP/tmp folder. For example:
74+
It is recommended to change the path of the purifier libs cache to your `tmp` folder. For example:
7275

7376
```php
7477
Purifier::config('ConfigName', array(
75-
'Cache.SerializerPath' => APP . 'tmp' . DS . 'purifier',
78+
'Cache.SerializerPath' => ROOT . DS . 'tmp' . DS . 'purifier',
7679
)
7780
);
7881
```
@@ -85,7 +88,7 @@ Set a config you want to use and the fields you want to sanitize.
8588

8689
```php
8790
public $actsAs = array(
88-
'HtmlPurifier.HtmlPurifier' => array(
91+
'Burzum/HtmlPurifier.HtmlPurifier' => array(
8992
'config' => 'ConfigName',
9093
'fields' => array(
9194
'body', 'excerpt'
@@ -100,7 +103,7 @@ In your controller load the helper and set a default config if you want.
100103

101104
```php
102105
public $helpers = array(
103-
'HtmlPurifier.HtmlPurifier' => array(
106+
'Burzum/HtmlPurifier.HtmlPurifier' => array(
104107
'config' => 'ConfigName'
105108
)
106109
);

0 commit comments

Comments
 (0)