helios-ag / FMBbCodeBundle

:capital_abcd: BBCode bundle for Symfony projects
Other
57 stars 35 forks source link

Disable Decoda's default emoticons #135

Open jrmyio opened 8 years ago

jrmyio commented 8 years ago

I configured my own emoticons.yml but it seems that the decoda's emoticons listed in: vendor\mjohnson\decoda\src\config\emoticons.php are still parsed...

How to configure FMBbCodeBundle to completely overwrite the decoda's emoticons?

alquerci commented 8 years ago

Currently there is only one solution to disable Decoda's default emoticons.

Extends FM\BbcodeBundle\Decoda\Hook\EmoticonHook class and override getEmoticonCollection method without the code between line 157 and line 176 and sets the parameter fm_bbcode.decoda.hook.emoticon.class with your extended class name (ref).

sauls commented 8 years ago

This would work if only extened class could access private function used in https://github.com/helios-ag/FMBbCodeBundle/blob/a46ba41a6198f7c6f5b8784b25d53c16fa5de97e/Decoda/Hook/EmoticonHook.php#L183 :disappointed:

https://github.com/helios-ag/FMBbCodeBundle/blob/a46ba41a6198f7c6f5b8784b25d53c16fa5de97e/Decoda/Hook/EmoticonHook.php#L293 , can you make it protected?