(15 Jul, 2015, 7:53 am)BitLiberal escribió: Al parecer tienes instalado el plugin Quick Advanced Editor.
Prueba esto:
Vete a ACP > Estilos y Plantillas > Plantillas > Plantillas globales > codebutquick
Busca esta linea:
Código PHP:<?php
rtl: {$lang->settings['rtl']},
<?php
rtl: {$lang->settings['rtl']},
autofocus: false,
(15 Jul, 2015, 8:09 am)comy91 escribió: Sigue igual ¿tienes alguna plantilla predeterminada de codebutquick? A ver si así funciona
<?php
<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/sceditor/editor_themes/{$theme['editortheme']}" type="text/css" media="all" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js"></script>
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
plugins: "bbcode",
style: "{$mybb->asset_url}/jscripts/sceditor/textarea_styles/jquery.sceditor.{$theme['editortheme']}",
rtl: {$lang->settings['rtl']},
locale: "mybblang",
enablePasteFiltering: true,
emoticonsEnabled: {$emoticons_enabled},
emoticons: {
// Emoticons to be included in the dropdown
dropdown: {
{$dropdownsmilies}
},
// Emoticons to be included in the more section
more: {
{$moresmilies}
},
// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
hidden: {
{$hiddensmilies}
}
},
emoticonsCompat: true,
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",
};
{$editor_language}
function qae_as() {
if (MyBBEditor) {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
link_can = document.querySelector("link[rel='canonical']").href;
if (!sc_asd) {
sc_asd = {};
}
if (MyBBEditor.val() != sc_asd[link_can]) {
if ($.trim(MyBBEditor.val())) {
if(!$('#autosave').length) {
$('<div/>', { id: 'autosave', class: 'bottom-right' }).appendTo('body');
}
setTimeout(function() {
$('#autosave').jGrowl('{$mybb->settings['quickadveditor_save_lang']}', { life: 500 });
},200);
sc_asd[link_can] = MyBBEditor.val();
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
else {
if (sc_asd[link_can]) {
delete sc_asd[link_can];
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
}
}
}
}
function qae_ac() {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
link_can = document.querySelector("link[rel='canonical']").href;
if (!sc_asd) {
sc_asd = {};
}
if (sc_asd[link_can]) {
delete sc_asd[link_can];
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
}
function qae_ar() {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
if (!sc_asd) {
sc_asd = {};
}
if(Object.keys(sc_asd).length > {$mybb->settings['quickadveditor_saveamount']}) {
delete sc_asd[Object.keys(sc_asd)[0]];
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
}
if({$mybb->settings['quickadveditor_qedit']}!=0) {
($.fn.on || $.fn.live).call($(document), 'click', '.quick_edit_button', function () {
$.jGrowl('<img src="images/spinner_big.gif" />');
ed_id = $(this).attr('id');
var pid = ed_id.replace( /[^0-9]/g, '');
$('#quickedit_'+pid).height('{$mybb->settings['quickadveditor_qued_heigh']}px');
setTimeout(function() {
$('#quickedit_'+pid).sceditor(opt_editor);
if ($('#quickedit_'+pid).sceditor('instance')) {
$('#quickedit_'+pid).sceditor('instance').focus();
$('#quickedit_'+pid).next().css( "z-index", "5" );
}
offset = $('#quickedit_'+pid).next().offset().top - 60;
setTimeout(function() {
$('html, body').animate({
scrollTop: offset
}, 700);
setTimeout(function() {
$('#pid_'+pid).find('button[type="submit"]').attr( 'id', 'quicksub_'+pid );
},200);
if($(".jGrowl-notification:last-child").length) {
$(".jGrowl-notification:last-child").remove();
}
},200);
if('{$sourcemode}' != '') {
$('textarea[name*="value"]').sceditor('instance').sourceMode(true);
}
},400);
});
}
($.fn.on || $.fn.live).call($(document), 'click', 'button[id*="quicksub_"]', function () {
ed_id = $(this).attr('id');
pid = ed_id.replace( /[^0-9]/g, '');
$('#quickedit_'+pid).sceditor('instance').updateOriginal();
});
($.fn.on || $.fn.live).call($(document), 'click', 'input[accesskey*="s"]', function () {
qae_ac();
});
$(document).ready(function() {
$('#message').height('{$mybb->settings['quickadveditor_qurp_heigh']}px');
var link_can = document.querySelector("link[rel='canonical']").href;
$('#message').sceditor(opt_editor);
MyBBEditor = $('#message').sceditor('instance');
{$sourcemode}
if({$mybb->settings['quickadveditor_autosave']}!=0) {
setInterval(function() {
qae_as();
qae_ar();
},{$mybb->settings['quickadveditor_savetime']}*1000);
setTimeout(function() {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
restitem = "";
if (sc_asd) {
restitem = sc_asd[link_can];
}
if (restitem) {
var restorebut = [
'<a class="sceditor-button" title="{$mybb->settings['quickadveditor_restor_lang']}" onclick="MyBBEditor.insert(restitem);">',
'<div style="background-image: url(images/rest.png); opacity: 1; cursor: pointer;">{$mybb->settings['quickadveditor_restor_lang']}</div>',
'</a>'
];
$(restorebut.join('')).appendTo('.sceditor-group:last');
}
},600);
MyBBEditor.blur(function(e) {
if ($.trim(MyBBEditor.val())) {
qae_as();
}
else {
qae_ac();
}
});
}
});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== 'undefined')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
var link_can = document.querySelector("link[rel='canonical']").href;
if(MyBBEditor) {
MyBBEditor.updateOriginal();
if({$mybb->settings['quickadveditor_autosave']}!=0) {
qae_ac();
}
$('form[id*="quick_reply_form"]').bind('reset', function() {
MyBBEditor.val('').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>
(17 Jul, 2015, 5:25 am)BitLiberal escribió:Código PHP:<?php
<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/sceditor/editor_themes/{$theme['editortheme']}" type="text/css" media="all" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js"></script>
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
plugins: "bbcode",
style: "{$mybb->asset_url}/jscripts/sceditor/textarea_styles/jquery.sceditor.{$theme['editortheme']}",
rtl: {$lang->settings['rtl']},
locale: "mybblang",
enablePasteFiltering: true,
emoticonsEnabled: {$emoticons_enabled},
emoticons: {
// Emoticons to be included in the dropdown
dropdown: {
{$dropdownsmilies}
},
// Emoticons to be included in the more section
more: {
{$moresmilies}
},
// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
hidden: {
{$hiddensmilies}
}
},
emoticonsCompat: true,
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",
};
{$editor_language}
function qae_as() {
if (MyBBEditor) {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
link_can = document.querySelector("link[rel='canonical']").href;
if (!sc_asd) {
sc_asd = {};
}
if (MyBBEditor.val() != sc_asd[link_can]) {
if ($.trim(MyBBEditor.val())) {
if(!$('#autosave').length) {
$('<div/>', { id: 'autosave', class: 'bottom-right' }).appendTo('body');
}
setTimeout(function() {
$('#autosave').jGrowl('{$mybb->settings['quickadveditor_save_lang']}', { life: 500 });
},200);
sc_asd[link_can] = MyBBEditor.val();
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
else {
if (sc_asd[link_can]) {
delete sc_asd[link_can];
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
}
}
}
}
function qae_ac() {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
link_can = document.querySelector("link[rel='canonical']").href;
if (!sc_asd) {
sc_asd = {};
}
if (sc_asd[link_can]) {
delete sc_asd[link_can];
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
}
function qae_ar() {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
if (!sc_asd) {
sc_asd = {};
}
if(Object.keys(sc_asd).length > {$mybb->settings['quickadveditor_saveamount']}) {
delete sc_asd[Object.keys(sc_asd)[0]];
localStorage.setItem('sc_as', JSON.stringify(sc_asd));
}
}
if({$mybb->settings['quickadveditor_qedit']}!=0) {
($.fn.on || $.fn.live).call($(document), 'click', '.quick_edit_button', function () {
$.jGrowl('<img src="images/spinner_big.gif" />');
ed_id = $(this).attr('id');
var pid = ed_id.replace( /[^0-9]/g, '');
$('#quickedit_'+pid).height('{$mybb->settings['quickadveditor_qued_heigh']}px');
setTimeout(function() {
$('#quickedit_'+pid).sceditor(opt_editor);
if ($('#quickedit_'+pid).sceditor('instance')) {
$('#quickedit_'+pid).sceditor('instance').focus();
$('#quickedit_'+pid).next().css( "z-index", "5" );
}
offset = $('#quickedit_'+pid).next().offset().top - 60;
setTimeout(function() {
$('html, body').animate({
scrollTop: offset
}, 700);
setTimeout(function() {
$('#pid_'+pid).find('button[type="submit"]').attr( 'id', 'quicksub_'+pid );
},200);
if($(".jGrowl-notification:last-child").length) {
$(".jGrowl-notification:last-child").remove();
}
},200);
if('{$sourcemode}' != '') {
$('textarea[name*="value"]').sceditor('instance').sourceMode(true);
}
},400);
});
}
($.fn.on || $.fn.live).call($(document), 'click', 'button[id*="quicksub_"]', function () {
ed_id = $(this).attr('id');
pid = ed_id.replace( /[^0-9]/g, '');
$('#quickedit_'+pid).sceditor('instance').updateOriginal();
});
($.fn.on || $.fn.live).call($(document), 'click', 'input[accesskey*="s"]', function () {
qae_ac();
});
$(document).ready(function() {
$('#message').height('{$mybb->settings['quickadveditor_qurp_heigh']}px');
var link_can = document.querySelector("link[rel='canonical']").href;
$('#message').sceditor(opt_editor);
MyBBEditor = $('#message').sceditor('instance');
{$sourcemode}
if({$mybb->settings['quickadveditor_autosave']}!=0) {
setInterval(function() {
qae_as();
qae_ar();
},{$mybb->settings['quickadveditor_savetime']}*1000);
setTimeout(function() {
sc_asd = JSON.parse(localStorage.getItem('sc_as'));
restitem = "";
if (sc_asd) {
restitem = sc_asd[link_can];
}
if (restitem) {
var restorebut = [
'<a class="sceditor-button" title="{$mybb->settings['quickadveditor_restor_lang']}" onclick="MyBBEditor.insert(restitem);">',
'<div style="background-image: url(images/rest.png); opacity: 1; cursor: pointer;">{$mybb->settings['quickadveditor_restor_lang']}</div>',
'</a>'
];
$(restorebut.join('')).appendTo('.sceditor-group:last');
}
},600);
MyBBEditor.blur(function(e) {
if ($.trim(MyBBEditor.val())) {
qae_as();
}
else {
qae_ac();
}
});
}
});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== 'undefined')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
var link_can = document.querySelector("link[rel='canonical']").href;
if(MyBBEditor) {
MyBBEditor.updateOriginal();
if({$mybb->settings['quickadveditor_autosave']}!=0) {
qae_ac();
}
$('form[id*="quick_reply_form"]').bind('reset', function() {
MyBBEditor.val('').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>
<?php
/**********************************
* Thread compatibility functions *
**********************************/
<?php
if(1!=0) {
($.fn.on || $.fn.live).call($(document), 'focus', 'textarea[name*="value"]', function () {
$(this).sceditor(opt_editor);
setTimeout(function() {
if ($('textarea[name*="value"]').sceditor('instance')) {
$('textarea[name*="value"]').sceditor('instance').focus();
}
offset = $('textarea[name*="value"]').next().offset().top - 60;
setTimeout(function() {
$('html, body').animate({
scrollTop: offset
}, 700);
},200);
},100);
});
}
function call_editor() {
if (typeof sceditor == 'undefined') {
$('#message').sceditor(opt_editor);
if($('#clickable_smilies').length) {
$('#clickable_smilies').closest('div').show();
}
MyBBEditor = $('#message').sceditor('instance');
}
}
function focus_editor() {
setTimeout(function() {
if (MyBBEditor) {
MyBBEditor.focus();
}
offset = $('#message').next().offset().top - 60;
setTimeout(function() {
$('html, body').animate({
scrollTop: offset
}, 700);
},200);
},100);
}
($.fn.on || $.fn.live).call($(document), 'focus', '#message', function () {
call_editor();
focus_editor();
});
($.fn.on || $.fn.live).call($(document), 'click', 'a[id*="multiquote_link_"]', function () {
call_editor();
});
if(Cookie.get('multiquote')) {
call_editor();
};
(17 Jul, 2015, 10:17 pm)Cluster escribió: Te ahorro trabajo, este plugin ya tiene dicha función http://community.mybb.com/mods.php?action=view&pid=28
(22 Jul, 2015, 10:16 pm)comy91 escribió:(17 Jul, 2015, 10:17 pm)Cluster escribió: Te ahorro trabajo, este plugin ya tiene dicha función http://community.mybb.com/mods.php?action=view&pid=28
Ese es el plugin que tengo instalado y sigue sin funccionar