Teddy Scott
Active member
yeah... It actually was a pain.. I messed up on a edit and lost my entire editor box at one point.
lol
I fixed it though..
lol
I fixed it though..
<img src="http://www.source_to_small_smiley_you_uploaded_to_your_site/small.gif" alt="smilies">
<img src="http://www.source_to_small_smiley_you_uploaded_to_your_site/small.gif" alt="smilies">
xenforo_smilies_menu_image: '@imagePath/xenforo/editor/smilie.png',
//xenforo_smilies_menu_image: '@imagePath/xenforo/editor/smilie.png',
You can't tell all your members not to click it though and if you have upwards of 50 smilies.....
Just removing the smilie button from the menu worked for me.
You can't tell all your members not to click it though and if you have upwards of 50 smilies.....
Just removing the smilie button from the menu worked for me.
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'
};
}
});
/*
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'
};
}
});
*/
They don't have to close the smiley tab. Once they've selected their smilies, and posted their reply, it closes on its own.A small suggestion: Having more than 100 smilies it is very hard for users to scroll to the bottom even of this wonderful mod to close the smiliey tab. Maybe create a small link inside an opened tab to close it? Just a suggestion![]()
Nope, most edits have to be re-applied. Especially template edits.Its a great edit. Thanks Paul. Anyone figure out how to keep the edits each time a new beta upgrade is loaded?
The odd thing is after the 4.0 to beta 5.0 upgrade I did not notice a change to editor_template.js but yet the smilie drop down link from hell showed back up again.
Yes, but they have to scroll down some in order to get to the "POST REPLY" button. In some cases users will get annoyed doing that...They don't have to close the smiley tab. Once they've selected their smilies, and posted their reply, it closes on its own.![]()
Yeah, they have to scroll down some to do anything on a forum. Like Brogan said, edit the template and move the button. But tbh, 100 smilies isn't all that many to have to scroll past.Yes, but they have to scroll down some in order to get to the "POST REPLY" button. In some cases users will get annoyed doing that...
Yeah, they have to scroll down some to do anything on a forum. Like Brogan said, edit the template and move the button. But tbh, 100 smilies isn't all that many to have to scroll past.
That would take quite a bit of re-coding on this add-on, I think.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...![]()
We use essential cookies to make this site work, and optional cookies to enhance your experience.