Created
February 24, 2015 02:23
-
-
Save helios-ag/614ad58ea1619d22581c to your computer and use it in GitHub Desktop.
Custom emoticons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fm_bbcode: | |
filter_sets: | |
my_default_filter: | |
strict: false # if you want to parse attr values without quotes | |
locale: en | |
xhtml: false | |
filters: [ default, block, code, email, image, list, url ] | |
hooks: [emoticon] | |
emoticon: | |
resource: %kernel.root_dir%/config/emoticons.yml | |
### | |
emoticons: | |
my_custom_smile: | |
smilies: | |
- ":my_custom_smile:" | |
### place my_custom_smile.png under web/emoticons folder | |
Yes, emoticons node should be in emoticons.yml file under config dir
the full configuration for emoticons is
emoticons:
my_custom_smile:
url: %fm_bbcode.emoticon.path%/my_custom_smile.png
html: <img src="%fm_bbcode.emoticon.path%/my_custom_smile.png" alt="" >
xHtml: <img src="%fm_bbcode.emoticon.path%/my_custom_smile.png" alt="" />
smilies:
- ":my_custom_smile:"
You can change configuration with configuration above or u can change extension
fm_bbcode:
filter_sets:
my_default_filter:
strict: false # if you want to parse attr values without quotes
locale: en
xhtml: false
filters: [ default, block, code, email, image, list, url ]
hooks: [emoticon]
emoticon:
resource: %kernel.root_dir%/config/emoticons.yml
extension: gif << default is png
Is it a known problem that some smilies like ">:)", ":@" and "(8>" won't work? I can't get ":'(" working at all. Can you? (@symfony 2.6.4)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The "### emoticons: -part" should be in %kernel.root_dir%/config/emoticons.yml, right? But then where or how do I have to define the location of the .gif file? As 🆒 etc DO work, :my_custom_smile: does not. Wich makes sense as there is no gif defined. I'm thankful for taking your time to help me :)