MyBB Community Forums

Full Version: "My Spoiler" and "Quick Advanced Editor". Spoiler now showing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

I have installed "My Spoiler" plugin in order to add spoiler functionality to my forum. It allowes to create spoilers with [spoiler][/spoiler] and also add bbcode to sceditor.

Everything worked fine but then I installed "Quick Advanced Editor" which (as I understand) only addes bbcodes panel to a quick reply editor.

The problem is that there is no spoiler button in it.

Both quick reply and new reply editors have the same "sceditor-toolbar" with the same buttons in it. The only difference is that there is no spoiler button in quick reply editor.

Here is "My Spoiler" activate function:

function myspoiler_activate()
{
	// Creamos la hoja de estilo para el spoiler.

	global $db;
	$query_tid = $db->write_query("SELECT tid FROM ".TABLE_PREFIX."themes WHERE def='1'");
	$themetid = $db->fetch_array($query_tid);
	$estilo = array(
			'name'         => 'spoiler.css',
			'tid'          => $themetid['tid'],
			'attachedto'   => 'showthread.php|newthread.php|newreply.php|editpost.php|private.php|announcements.php',
			'stylesheet'   => '.spoiler {
	background: #f5f5f5;
	border: 1px solid #bbb;
	margin-bottom: 15px;
	border-radius: 5px;
	-moz-border-radius:5px;
	-webkit-border-radius:5px;
}
',
		'lastmodified' => TIME_NOW
	);
	$sid = $db->insert_query('themestylesheets', $estilo);
	$db->update_query('themestylesheets', array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);
	$query = $db->simple_select('themes', 'tid');
	while($theme = $db->fetch_array($query))
	{
		require_once MYBB_ADMIN_DIR.'inc/functions_themes.php';
		update_theme_stylesheet_list($theme['tid']);
	}
   	require MYBB_ROOT.'inc/adminfunctions_templates.php';
    // Reemplazos que vamos a hacer en las plantillas 1.- Platilla 2.- Contenido a Reemplazar 3.- Contenido que reemplaza lo anterior
    find_replace_templatesets("codebuttons", '#'.preg_quote('<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js?ver=1804"></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/spoiler.js?ver=1804"></script>');
    find_replace_templatesets("codebuttons", '#'.preg_quote('{$link}').'#', '{$link},spoiler');
}
This one won't add a button to the editor.

But I currently have "Spoiler MyCode" (by Sepiroth), and Quick Advanced Editor Plus.

If someone manually types spoiler tags in either the quick editor, or the full editor, it works.

Did "My Spoiler" automatically add a spoiler button, or did you have to do something else?
(2016-07-25, 02:03 PM)nuraman00 Wrote: [ -> ]Did "My Spoiler" automatically add a spoiler button, or did you have to do something else?

No it doesnt. None of the mods add a spoiler button to sceditor. Although tags become supported. 

None of the authors provide a complete mod. They all say that you gotta create some css that you gota write yourself etc.. 
I have no idea what i need to write in it.. how it should be named etc.
Could someone share all the needed files please. I need a spoiler button in my editior