Topic: Adding more Emoticon to CKEditor
Hello,
May I know how can you add more emoticons to the CKeditor (add news)? Thanks!
Dear CuteNews Users! Please feel free to contact us via our new Feedback Form and please send information about bugs to our bug tracker.
You are not logged in. Please login or register.
CutePHP Forums → Problem Solving / Help & Support → Adding more Emoticon to CKEditor
Hello,
May I know how can you add more emoticons to the CKeditor (add news)? Thanks!
Problem solved.
would you like to share with us?
You want to open: CuteNews -> Core -> ckeditor -> ckeditor.js in a text editing application (I.E. Notepad, however I prefer Crimson Editor).
It's going to look insane at first glance, but be patient. You're looking for:
i.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];i.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];
Focus on this section, and this section alone, it's all you need. In fact, what I did to ease my mind, was break the code (meaning, right before the "i" in "i.smiley_images" I pressed enter twice. I did the same thing right before the "i" in "i.smiley_description" and again one last time after "'mail'];" to make it easier.
The code above is broken into two parts. First the image file name including extension, and then a name for that file.
For example, say you only had one smiley, named "smile.gif". Then your code will look like this:
i.smiley_images=['smile.gif'];i.smiley_descriptions=['smile'];
Also, the order you put the smileys in is the order they're displayed in CKEditor. You must make sure that i.smile_images and i.smile_descriptions follow the same order. What I did to make this easier, I erased all the smileys and added them in one at a time. I didn't test it, but I'm pretty sure you can use .PNG icons, if you'd like.
I understand that a lot of you get freaked out when reading code, like I used to when I began my adventure. I'm going to include my personal ckeditor.js file. It's exactly the same as the one that comes default in 1.5.3, but I spaced out the smiley section for easier editing and I replaced all of the smileys. I'll also include a screen shot of what my CKEditor looks like when you click to add smileys.
Hope this helps someone!
One thing I forgot to mention, just to avoid any confusion, in the code I provided as example if there was only one smiley, the code would look like this if you had two smileys, one named smile and one named wink
i.smiley_images=['smile.gif', 'wink.gif'];i.smiley_descriptions=['smile', 'wink'];
Make sure you enclose both the file name and the description in single quotes ( ' ' ) and you separate each item with a comma ( 'file1.ext', 'file2.ext' )
Good luck!
open: CuteNews -> Core -> ckeditor -> ckeditor.js in a text editing application (I.E. Notepad, however I prefer Crimson Editor).
i.smiley_images=['smile.gif'];i.smiley_descriptions=['smile'];
the order you put the smileys in is the order they're displayed in CKEditor. screenshot mac You must make sure that i.smile_images and i.smile_descriptions follow the same order.
Best Crazy Games is a game publisher made to provide the best online games on the web. Every day we publish new fresh games with high and quality gameplay.
https://www.facebook.com/playcraygamesonline
Best Crazy Games is a game publisher made to provide the best online games on the web. Every day we publish new fresh games with high and quality gameplay.
https://twitter.com/crazygamesonli1
However, in these races, you don't just gamble for first place and a reputation with your friends. Sometimes there are other types of prizes involved: money, new cars, more complicated race tracks
https://www.bestcrazygames.com/tags
CutePHP Forums → Problem Solving / Help & Support → Adding more Emoticon to CKEditor
Powered by PunBB, supported by Informer Technologies, Inc.
The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.