• 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

Weird, all mine show up.
Did you try editing and saving one? They should all be there then.
Have edited and saved one. All smilies are inserted in database. It seems the happy place not large enough to hold 120 smilies. Anyway, its happy enough now.
 
oh, it's big enough, see attachment. not sure what's wrong with yours though? I've got around 200 in there right now. Maybe something's a bit off or there's a conflict somewhere. Just sayin :0
happyplace.webp
 
oh, you seems very happy. My happy place not grow large enough to display more than 84 smilies. Never mind. Some updates later to better organize the smilies.
 
this reminds me of the good ol days of vb hacking :)
just installed this mod on a beta 4 update without a hitch. basically only needed to re-edit templates i had reverted, no need to 'reinstall' or reupload anything.
the instructions in post one are the same all the way up until the last template edit.
it should now read as this:

in editor_ui.css
PHP:
//find
.xenForoSkin span.mce_xenforo_code { background:url(@imagePath/xenforo/editor/code.png) no-repeat; }



//add after:
<xen:include template="editor_happyplace.css" />



//example:
.xenForoSkin span.mce_xenforo_media {background-position:-320px -20px}
.xenForoSkin span.mce_xenforo_quote {background-position:-220px 0}
.xenForoSkin span.mce_xenforo_code { background:url(@imagePath/xenforo/editor/code.png) no-repeat; }

<xen:include template="editor_happyplace.css" />
 
heh, I've got plenty more stacked up from years of forum administration. My avatar/smiley collection is pretty huge. I just didn't want to overload my forum (yet) with the size of my collection. Categories would be good, but that might make smileys a bit more confusing.
 
Smilies are fun to collect :D
Even more fun to use.
good.gif
 
would it be possible to add the tab button that says 'smilies', to the top of the expanded view of smilies - so that if you've got a zillion smilies you don't have to scroll down to close the smilie box again? (would make it quicker and easier to hit 'post reply' if you just click on the 'smilies tab to close the box again... :)
 
Hi very nice one but i have probs with removing the smile Field inside the editor. i´ve done whats written here but after editing the js File the whole editor is off, just the smile Button ist still visible
Also when i click to "More Options..." i get this error
Fatal error: Class 'XenForo_Captcha_Abstract' not found in /var/www/vhosts/domain.com/subdomains/xf/httpdocs/library/XenForo/ControllerPublic/Thread.php on line 420
 
It looks like you did the opposite of what they wanted done. The only thing commented out should be from
Code:
/*
	tinymce.create('tinymce.plugins.XenForoSmilies', {
to
Code:
{
			return {
				longname : 'XenForo Smilies',
				author : '',
				version : '1.0'
			};
		}
	});
*/

In fact, if you find those lines and replace them just as they are pasted here, your problem will be resolved.

I know the edit works, as I use it myself. There's no way I'd have the number of smilies I do on my forums dropping down in that nasty menu ;)
 
Thank you twhiting9275
I dont know what went wrong but yours helped me.

But i still get the Fatal Error
 
Sounds like something else you changed caused problems, specifically a capcha edit. This file doesn't even refer to the captcha setup, only the wisywig editor.
I'm assuming you made more than one change when you added this addon?
 
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'
            };
        }
    });
I tried this edit and it did not do anything for me.
Is this what the altered code should look like:
 
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'
            };
        }
    });*/
 
Top Bottom