@@ -40,26 +40,33 @@ Using Composer, just add the following configuration to your `composer.json`:
4040
4141Or you can use composer to install this bundle:
4242
43- For symfony <3.0, use latest ~ 6 version
43+ For Symfony <3.0, use latest ~ 6 version
4444
4545``` sh
4646composer require helios-ag/fm-bbcode-bundle:~ 6
4747```
4848
49- for Symfony 3
49+ For Symfony 3.0, use latest ~ 7 version
5050
5151``` sh
5252composer require helios-ag/fm-bbcode-bundle
5353```
54+
5455or
5556
5657``` sh
5758composer require helios-ag/fm-bbcode-bundle:~ 7
5859```
5960
61+ For Symfony 4.0 you can use the ~ 8 version
62+
63+ ``` sh
64+ composer require helios-ag/fm-bbcode-bundle:~ 8
65+ ```
66+
6067### Step 2: Enable the bundle
6168
62- Finally, enable the bundle in the kernel :
69+ Finally, for Symfony2 and Symfony3, enable the bundle in the AppKernel :
6370
6471``` php
6572<?php
@@ -73,15 +80,32 @@ public function registerBundles()
7380 );
7481}
7582```
83+
84+ For Symfony4, you'll need to enable the bundle in your ` bundles.php ` -file:
85+ ``` php
86+ // config/bundles.php
87+
88+ return [
89+ // ...
90+ FM\BbcodeBundle\FMBbcodeBundle::class => ['all' => true],
91+ ];
92+ ```
93+
7694### Step 3: Dump emoticons (optional)
7795
7896To enable emoticons via emoticon hook, use the following command to copy emoticons images to
7997public folder (web/emoticons)
8098
99+ For Symfony2:
81100``` bash
82101 ./app/console bbcode:dump
83102```
84103
104+ For Symfony3 and Symfony4:
105+ ``` bash
106+ ./bin/console bbcode:dump
107+ ```
108+
85109## Basic configuration
86110
87111### Make the Twig extensions available by updating your configuration:
@@ -259,12 +283,27 @@ emoticons:
259283 - ":my_emoticon:"
260284` ` `
261285
286+ # ## How to customize the emoticons assets
287+
288+ To customize emoticons assets folders, use `path` and `folder` node configuration :
289+
290+ ` ` ` yaml
291+ # app/config.yml
292+
293+ fm_bbcode:
294+ public_path: # Default: %kernel.project_dir%/public
295+ emoticon:
296+ path: # Default: /emoticons
297+ folder: # Default: %kernel.project_dir%/vendor/mjohnson/decoda/emoticons%
298+ ` ` `
299+
300+ Using the default configuration it would dump the emoticons in ` %kernel.project_dir%/public/emoticons`
301+
262302# ## How to automatically dump emoticons on each deploy
263303
264- Add the following commands to you projects composer.json :
304+ Add the following commands to you projects ` composer.json` :
265305
266306` ` ` json
267- # composer.json
268307 "scripts": {
269308 "post-install-cmd": [
270309 "FM\\ BbcodeBundle\\ Composer\\ ScriptHandler::installEmoticons"
@@ -274,14 +313,3 @@ Add the following commands to you projects composer.json:
274313 ]
275314 }
276315` ` `
277-
278- To customize emoticons assets folders, use `path` and `folder` node configuration :
279-
280- ` ` ` yaml
281- # app/config.yml
282-
283- fm_bbcode:
284- emoticon:
285- path: # Default: /emoticons
286- folder: # Default: %kernel.root_dir%/../vendor/mjohnson/decoda/emoticons%
287- ` ` `
0 commit comments