• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

The Happy Place - Clickable Smilies Under Editor Control

Peggy, luckily I have four different hosting companies that I use. So, TeeVeeTown.com is working with no problems. I installed this and already setup a thread on how to use it: http://www.teeveetown.com/forum/threads/new-way-to-select-smilies-choose-your-smiley-wisely.99/

Works great! :D
Thanks Arny.

UGH still has that looooooong drop down tho, on the editor. I'm hoping he'll do something with that, like limit it to only 6 or 8 smilies.



Can you limit the number of smilies visible with a button to see more?
That's what I'm hoping for for the dropdown on the editor, to limit it to a certain # of smilies.
The tray acts as the "see more" container for all of the smilies.
 
Yes, that's true. That's why I would want something to bring attention to the tab at the bottom for now :)
 
It's great that it's possible, but I think it's too bulky. Not to my liking. A subtle dropdown is in my opinion a better solution for a quick reply.
 
  • Like
Reactions: Nix
It's great that it's possible, but I think it's too bulky. Not to my liking. A subtle dropdown is in my opinion a better solution for a quick reply.


The dropdown menu from hell is yesterday.

I'll be honest the screenshot in the first post doesn't do this script justice as the smilies used in that screenshot are of different sizes and height not giving a great preview of what this script is all about. I'm currently testing it with the xenforo smilies 18px I designed and I'll easily be able to fit 40-50 smilies on one light keeping the minimum height down when the tab is opened.

As for bulky, A tab sticking out isn't exactly what I call bulky. That would be saying the tab on thread listings is bulky.
 
The Happy Place -- Clickable Smilies Under Editor Control
* 1.0 - 20/11/2010


Thank you sooooooo much for this :D just testing locally, and all being well I will make a donation for your time and effort :D

Well done!!!
 
Thank you very much. You might need to consider a xen phrase for smilies instead of hard coding it to the code. Will make it much easier to translate for us bilinguals. :) thank you for everything though. Great mod!
 
Finally our smilies are getting some luvin'! THANK YOU to all involved!

I hope the next step is categories? Please? :)

Could you expand on how you see "Categories" working? Not quite sure I'm getting the drift there.

Excellent mod, currently downloading and putting into a test site before hitting the production ones.

Smilies deserve loving as well!
 
Thank you very much. You might need to consider a xen phrase for smilies instead of hard coding it to the code. Will make it much easier to translate for us bilinguals. :) thank you for everything though. Great mod!

Inph mentioned about using a phrase just after he posted the add-on last night. He has every intention in introducing that. :)


Could you expand on how you see "Categories" working? Not quite sure I'm getting the drift there.

Excellent mod, currently downloading and putting into a test site before hitting the production ones.

Smilies deserve loving as well!

Atleast the frontend navigation of smilies vs categories will work like a slide show. To navigate to the next category you click on "next" which will be an icon with the smilies shifting horizontally (slide) to the next category. :)
 
Ok... to remove the smilie field from the editor you have to perform a file edit, being:

> js > tinymce > themes > xenforo > editor_template.js

Find and hide the following by wrapping PHP comments around it: /* code in here */

Code:
tinymce.create('tinymce.plugins.XenForoSmilies', {
        addButtons : function (theme, tb)
        {
            var smilies = theme.settings.xenforo_smilies,
                controlManager = theme.editor.controlManager,
                editor = theme.editor,
                button, DOM = tinymce.DOM;

            if (typeof smilies === 'undefined' || smilies.length === 0 || smilies === {})
            {
                return;
            }

            button = controlManager.createSplitButton('xenforo_smilies', {
                title : 'xenforo.smilies_desc',
                image : theme.settings.xenforo_smilies_menu_image,
                icons : false,
                onclick : function() { button.showMenu(); }
            });
            button.onRenderMenu.add(function(menubutton, menu)
            {
                tinymce.each(smilies, function(smilie, smilieName)
                {
                    menu.add({
                        title : '<img src="' + DOM.encode(smilie[1]) + '" /> ' + DOM.encode(smilie[0]),
                        onclick : function()
                        {
                            editor.execCommand('mceInsertContent', false,
                                '<img src="' + DOM.encode(smilie[1]) + '" alt="' + DOM.encode(smilieName) + '" class="smilie" data-smilie="yes" />'
                            );
                        }
                    });
                });

                // need this to run after the render has happend
                setTimeout(function()
                {
                    var menuNode = DOM.get('menu_' + menu.id);
                    if (menuNode)
                    {
                        $('.mceText[title]', menuNode).each(function()
                        {
                            $(this).attr('title', '');
                        });
                    }
                }, 50);
            });
            tb.add(button);
        },

        getInfo : function()
        {
            return {
                longname : 'XenForo Smilies',
                author : '',
                version : '1.0'
            };
        }
    });
 
Yep... simple as that, and the dropdown is gone, just leaving the clickable smilie box.

You will have to remember to change that file on further upgrades, otherwise the package will overwrite it.
 
Top Bottom