Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] My Insert Buttons 4.0.2 : Now with imgur upload button + Description
#11
V2.0.0 Released:

Now with imgur upload button in your SCEditor


If you use Quick Advanced Editor or Quick Advanced Editor Plus:

Attention: If you using Mybb 1.8.5 or below you must replace inc/adminfunctions_templates.php with https://raw.githubusercontent.com/mybb/m...plates.php

Upload from 1.0.1:
- Unistall old version
- Upload new version
- Install
Reply
#12
Shoutbox imgur work but normal editor dont work

[img]undefined[/img]
Sad


Ok Work now: i change editor imgur code.i use shoutbox imgur code
Reply
#13
(2015-06-25, 03:43 PM)feilian Wrote: Shoutbox imgur work but normal editor dont work

[img]undefined[/img]
Sad


Ok Work now: i change editor imgur code.i use shoutbox imgur code

you saying about imgur client id?
yes you need put imgur client id to work.
Reply
#14
V3.0.0 Released:

Now with description button in your SCEditor

[Image: 1Z2gxXk.png]

If you use Quick Advanced Editor or Quick Advanced Editor Plus:

Attention: If you using Mybb 1.8.5 or below you must replace inc/adminfunctions_templates.php with https://raw.githubusercontent.com/mybb/m...plates.php

Upload from 2.0.0:
- Unistall old version
- Upload new version
- Install
Reply
#15
it's normal that i saw three times the same button?
Reply
#16
(2015-08-12, 05:09 PM)iso Wrote: it's normal that i saw three times the same button?

not...
plz past here your codebutton template here
Reply
#17
using this plugin with quick advance reply plus. but i am getting 3 icons like i added spoiler and imgur but i am getting and getting 3 times same icon. 
here is my codebuttons template 
<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/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1805"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/editor_plugins/undo.js?ver=1805"></script>
<script type="text/javascript">
var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
	plugins: "bbcode,undo",
	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|"+newbutbar+newbutbar2+"maximize,source",
};
{$editor_language}
$(function() {
	$("#{$bind}").sceditor(opt_editor);

	MyBBEditor = $("#{$bind}").sceditor("instance");
MyBBEditor.sourceMode(true);
});
</script>
also one confusion i am using this plugin for spoiler (Mycode spoiler) but spoiler tag not changing after i click source button here is image explanation of this. 
 non source mode
[Image: 8fIxRQw.png]
source mode on
[Image: MvSa2Rp.png]
as you see in upper image all mycode parsed but spoiler mycode not. so this is normal or not Undecided
Reply
#18
(2015-08-19, 08:03 PM)Samuel117 Wrote: as you see in upper image all mycode parsed but spoiler mycode not. so this is normal or not Undecided

parsed only after you post message and not in wysiwyg mode. This is normal behavior. You can chek in xenforo, same thing.

about repeated buttons this is happen in new reply or only in quick reply? if happen only in quick reply so plase post here codebutquick and codebutquick_pm template here located in global template.
Reply
#19
(2015-08-20, 04:09 AM)martec Wrote:
(2015-08-19, 08:03 PM)Samuel117 Wrote: as you see in upper image all mycode parsed but spoiler mycode not. so this is normal or not Undecided

parsed only after you post message and not in wysiwyg mode. This is normal behavior. You can chek in xenforo, same thing.

about repeated buttons this is happen in new reply or only in quick reply? if happen only in quick reply so plase post here codebutquick and codebutquick_pm template here located in global template.

Thanks. here is the code of codebutquick and codebutquick_pm templates. 
Codebutquick
<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/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js"></script>
{$quickquote}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/editor_plugins/undo.js?ver=1804"></script>
<script type="text/javascript">
var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
var partialmode = {$mybb->settings['partialmode']},
MYBB_SMILIES = {
	{$smilies_json}
},
opt_editor = {
	plugins: "bbcode,undo",
	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,{$link}|video{$emoticon}|{$list}{$code}quote|"+newbutbar+newbutbar2+""+newbutbar+newbutbar2+""+newbutbar+newbutbar2+"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['quickadveditorplus_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['quickadveditorplus_saveamount']}) {
		delete sc_asd[Object.keys(sc_asd)[0]];
		localStorage.setItem('sc_as', JSON.stringify(sc_asd));
	}
}

if({$mybb->settings['quickadveditorplus_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['quickadveditorplus_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 () {
	if({$mybb->settings['quickadveditorplus_autosave']}!=0) {
		qae_ac();
	}
});

$(document).ready(function() {
	$('#message').height('{$mybb->settings['quickadveditorplus_qurp_heigh']}px');
	$('#message').sceditor(opt_editor);
	MyBBEditor = $('#message').sceditor('instance');
	{$sourcemode}
	if({$mybb->settings['quickadveditorplus_autosave']}!=0) {
		setInterval(function() {
			qae_as();
			qae_ar();
		},{$mybb->settings['quickadveditorplus_savetime']}*1000);

		setTimeout(function() {
			sc_asd = JSON.parse(localStorage.getItem('sc_as'));
			restitem = "";
			link_can = document.querySelector("link[rel='canonical']").href;
			if (sc_asd) {
				restitem = sc_asd[link_can];
			}
			if (restitem) {
				var restorebut = [
					'<a class="sceditor-button" title="{$mybb->settings['quickadveditorplus_restore_lang']}" onclick="MyBBEditor.insert(restitem);">',
						'<div style="background-image: url(images/rest.png); opacity: 1; cursor: pointer;">{$mybb->settings['quickadveditorplus_restore_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) {
		if(MyBBEditor) {
			MyBBEditor.updateOriginal();
			if({$mybb->settings['quickadveditorplus_autosave']}!=0) {
				qae_ac();
			}
			$('form[id*="quick_reply_form"]').bind('reset', function() {
				MyBBEditor.val('').emoticons(true);
			});
		}

		return quickReplyFunc.call(this, e);
	};
};
</script>
Codebutquick_pm 
<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/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/myinsertbuttons/mibutton.js?ver=3.0.0"></script>
<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 newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
if (!'{$mybb->settings['myinsertbuttons_rules_des']}'.trim() == ''){
	newbut2 = '{$mybb->settings['myinsertbuttons_rules_des']}';
	newbutbar2 = ''+newbut2+'|';
	icm_but_rls = newbut2.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
		mibutton(''+icm_but_rls[i]+'',1);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}
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|"+newbutbar+newbutbar2+""+newbutbar+newbutbar2+""+newbutbar+newbutbar2+"maximize,source",
};
{$editor_language}

function qae_as() {
	if (MyBBEditor) {
		sc_asd = JSON.parse(localStorage.getItem('sc_as'));
		link_can = location.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['quickadveditorplus_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 = location.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['quickadveditorplus_saveamount']}) {
		delete sc_asd[Object.keys(sc_asd)[0]];
		localStorage.setItem('sc_as', JSON.stringify(sc_asd));
	}
}

($.fn.on || $.fn.live).call($(document), 'click', 'input[accesskey*="s"]', function () {
	MyBBEditor.updateOriginal();
	if({$mybb->settings['quickadveditorplus_autosave']}!=0) {
		qae_ac();
	}
});

($.fn.on || $.fn.live).call($(document), 'click', 'input[name*="preview"]', function () {
	MyBBEditor.updateOriginal();
});

$(document).ready(function() {
	$('#message').height('{$mybb->settings['quickadveditorplus_qurp_heigh']}px');
	$('#message').sceditor(opt_editor);
	MyBBEditor = $('#message').sceditor('instance');
	{$sourcemode}
	if({$mybb->settings['quickadveditorplus_autosave']}!=0) {
		setInterval(function() {
			qae_as();
			qae_ar();
		},{$mybb->settings['quickadveditorplus_savetime']}*1000);

		setTimeout(function() {
			sc_asd = JSON.parse(localStorage.getItem('sc_as'));
			link_can = location.href;
			restitem = "";
			if (sc_asd) {
				restitem = sc_asd[link_can];
			}			
			if (restitem) {
				var restorebut = [
					'<a class="sceditor-button" title="{$mybb->settings['quickadveditorplus_restore_lang']}" onclick="MyBBEditor.insert(restitem);">',
						'<div style="background-image: url(images/rest.png); opacity: 1; cursor: pointer;">{$mybb->settings['quickadveditorplus_restore_lang']}</div>',
					'</a>'
				];

				$(restorebut.join('')).appendTo('.sceditor-group:last');
			}
		},600);
		MyBBEditor.blur(function(e) {
			if ($.trim(MyBBEditor.val())) {
				qae_as();
			}
			else {
				qae_ac();
			}
		});
	}
});
</script>
Every insert button code is three time removed unnecessary codes now its fine. and thanks for pointing this template i can easily remove quick reply advance editor buttons using this  Big Grin
Reply
#20
For some reason, when I click the edit button on posts, it leads me to the Edit Post page, instead of dropping down options for Quick or Full Edit.

I have My Insert Buttons installed, but also have Yui Editor installed for only Quick Reply.

EDIT: Google Inspect Element said there's an error here in codebuttons template

var newbutbar = newbutbar2 = '',
iclid = '{$mybb->settings['myinsertbuttons_imgurapi']}';
if (!'{$mybb->settings['myinsertbuttons_rules']}'.trim() == ''){
	newbut = '{$mybb->settings['myinsertbuttons_rules']}';
	newbutbar = ''+newbut+'|';
	icm_but_rls = newbut.split(',');
	for (var i = icm_but_rls.length-1; i >= 0; i--) {
HERE ---> mibutton(''+icm_but_rls[i]+'',0);
		$(mibimage(''+icm_but_rls[i]+'')).insertAfter('textarea');
	}
}

Uncaught ReferenceError: MiButton is not defined.
just a noob.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)