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.
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 was working on adding smilies for most of the evening.... one... smiley... at... a... time... my... gawd... this.... is... s l o wwwwww.....
I'll sure be glad when Kier/Mike, or someone, makes a faster way for us to our smilies!
#happyplace
{
border: 1px solid #ccc;
border-top: none;
background: #f0f0ee;
padding: 5px 5px 10px 5px;
border-bottom-right-radius: 6px; -webkit-border-bottom-right-radius: 6px; -moz-border-radius-bottomright: 6px; -khtml-border-bottom-right-radius: 6px;
border-bottom-left-radius: 6px; -webkit-border-bottom-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -khtml-border-bottom-left-radius: 6px;
text-align: center;
}
From what I can see, simply adding these via sql queryYou can use SQL queries to populate the smilie table which is a lot quicker than manually entering the data in the ACP.
insert into xf_smilie VALUES(NULL, 'name','code','smileypath')
Yes, that's correct.From what I can see, simply adding these via sql query
works to get them in the database, but it doesn't actually add them to the editor (this, or the original XF dropdown), but if you edit a smiley and save it, that will put all those inserts in. Odd? Or am I just missing something?Code:insert into xf_smilie VALUES(NULL, 'name','code','smileypath')
We use essential cookies to make this site work, and optional cookies to enhance your experience.