YAFLogo

smn
  • smn
  • 55.6% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 3.1.13
a year ago
I'm using the "Smiley" plugin. Some standard smilies will display in the CKEditor, but won't display outside it, for example "blush" or "crying". What is the reason?

I also want to use my custom smiles. What do I have to do besides copying the pictures to the images directory and editing the lines:

CKEDITOR.config.smiley_images
CKEDITOR.config.smiley_descriptions
Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
a year ago
I recommend of using emoji instead of smilies.

Unicode  Emoji are available on every device. Directly from the keyboard or via the editor emoji button. You can also access them via Auto complete if you start typing ":".

If you want to use image based smilies you need to use the absolute image path to the image, and not the relative path.

Edit: old bbcode emoticons like blush or crying work if you use brackets like

[crying]

😢
smn
  • smn
  • 55.6% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 3.1.13
a year ago
Thanks for your reply.

I and several users I know think that emojis are a bad idea & dull and never use them.

When a user clicks on the "crying" icon of the Smiley plugin, in the end only the text 😢 is displayed, which is caused by the bbcode plugin. This is clearly a bug.

The barebones version of CKEditor already generates the necessary HTML code for inserting a img link to the location of the smiley, but YAF doesn't accept it when the post is saved.

Can you please help me how to force YAF to use HTML with the Smiley plugin instead of generating smiley BBCodes, which don't work.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
a year ago
Quote:

When a user clicks on the "crying" icon of the Smiley plugin, in the end only the text 😢 is displayed, which is caused by the bbcode plugin. This is clearly a bug.



This is not a bug, the forum editor only accepts bbcode and not html. 
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
a year ago
Quote:

Can you please help me how to force YAF to use HTML with the Smiley plugin instead of generating smiley BBCodes, which don't work.



Simply modify the smiley plugin to generate an img bbcode instead of an img html tag.
smn
  • smn
  • 55.6% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 3.1.13
a year ago
Originally Posted by: tha_watcha 

Quote:

When a user clicks on the "crying" icon of the Smiley plugin, in the end only the text 😢 is displayed, which is caused by the bbcode plugin. This is clearly a bug.



This is not a bug, the forum editor only accepts bbcode and not html. 



How is this not a bug? The user selects a smiley from the dialog, but the smiley isn't displayed.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
a year ago
Originally Posted by: smn 

Originally Posted by: tha_watcha 

Quote:

When a user clicks on the "crying" icon of the Smiley plugin, in the end only the text 😢 is displayed, which is caused by the bbcode plugin. This is clearly a bug.



This is not a bug, the forum editor only accepts bbcode and not html. 



How is this not a bug? The user selects a smiley from the dialog, but the smiley isn't displayed.



If you manually add not compatible plugins to the editor then of course then its not a bug of the forum.

That plugin is not part of the editor. as i wrote above you need to modify the plugin to change the output to img bbcode and not an html tag.
smn
  • smn
  • 55.6% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 3.1.13
a year ago
The smiley plugin is included in the YAF distribution. It was not added manually. 😢 is not a HTML tag.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
a year ago
Originally Posted by: smn 

The smiley plugin is included in the YAF distribution. It was not added manually. 😢 is not a HTML tag.



Okay youre right its included. It will be removed in the next release. But again it can not work.  if you look at the source it creates an img html tag

https://github.com/ckeditor/ckeditor4/blob/3797ca6f6596b2f0748200c8fc8dd9d82f296839/plugins/smiley/dialogs/smiley.js#L28 

Modify it and it will work.
smn
  • smn
  • 55.6% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 3.1.13
a year ago
I have managed to get it working by changing these lines (starting at line 28) in ckeditor/plugins/smiley/smiley.js

            var img = editor.document.createElement( 'img', {
                attributes: {
                    type: 'image',
                    'src': src,
                    alt: ''
                }
            } );

 
smn
  • smn
  • 55.6% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 3.1.13
11 months ago
The smiley plugin was officially removed in YAF version 3.1.13, but we made our custom version work with bbcodes.

 smiley.png You have insufficient rights to see the content.
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button