My forum: http://www.1000sunny.net/
ver: phpbb3
I tried to use this JS code by @Ange Tuteur
from this topic
to move the dice roll sceditor to quick reply but it seems not to work in my forum...
it appear like this, without any option to choose.
please help.
ver: phpbb3
I tried to use this JS code by @Ange Tuteur
from this topic
- Code:
$(function(){$(function() {
if (!$.sceditor || $('.sceditor-button-faroll').length) return; // return if the editor isn't present or the dice exist
var a = document.createElement('A'), b = document.createElement('DIV'), c = $('.sceditor-button-emoticon')[0], sce = $('#text_editor_textarea').sceditor('instance'), i = 0, j = dice.length, opt, n;
// button attributes
a.className = 'sceditor-button sceditor-button-faroll';
a.title = $.sceditor.commands.faroll.tooltip;
a.innerHTML = '<div unselectable="on"></div>';
a.onclick = function() { b.style.display.match(/none/) ? b.style.display = '' : b.style.display = 'none' };
a.onmouseover = function() { a.className.match(/disabled/) && (a.className = a.className.replace(/disabled/,'')) }; // remove disabled caused by source change
// dropdown attributes
b.className = 'sceditor-dropdown sceditor-faroll-picker';
b.style.display = 'none';
b.style.marginTop = '25px';
// create dice roll options
for (; i<j; i++) {
n = dice[i];
opt = document.createElement('A');
opt.className = 'sceditor-fontsize-option';
opt.innerHTML = n;
opt.onclick = function() {
sce.inSourceMode() ? sce.sourceEditorInsertText('[roll="'+n+'"][/roll]') : sce.wysiwygEditorInsertText('[roll="'+n+'"][/roll]');
b.style.display = 'none';
};
b.appendChild(opt);
}
// insert button and dropdown
c.parentNode.insertBefore(a,c);
c.parentNode.insertBefore(b,c);
})});
to move the dice roll sceditor to quick reply but it seems not to work in my forum...
it appear like this, without any option to choose.
please help.