Pretty easy. Not sure about 3.5 or 3.0 but in vB 3.6:
PHP Code:
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('posting');
$specialtemplates = array('bbcodecache');
$globaltemplates = array(
// message stuff 3.5
'editor_toolbar_on',
'editor_smilie',
// message area for wysiwyg / non wysiwyg
'editor_clientscript',
'editor_toolbar_off',
// javascript menu builders
'editor_jsoptions_font',
'editor_jsoptions_size',
// smiliebox templates
'editor_smiliebox',
'editor_smiliebox_category',
'editor_smiliebox_row',
'editor_smiliebox_straggler'
);
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_editor.php');
$style = $db->query_first_slave("
SELECT *
FROM " . TABLE_PREFIX . "style
WHERE (styleid = " . $vbulletin->userinfo['styleid'] . ")
OR styleid = " . $vbulletin->options['styleid'] . "
ORDER BY styleid " . iif($vbulletin->userinfo['styleid'] > $vbulletin->options['styleid'], 'DESC', 'ASC') . "
LIMIT 1
");
define('STYLEID', $style['styleid']);
// now get all the templates we have specified
cache_templates($globaltemplates, $style['templatelist']);
unset($globaltemplates);
// #############################################################################
// get style variables
$stylevar = fetch_stylevars($style, $vbulletin->userinfo);
$editorid = construct_edit_toolbar(
'',
0,
'',
false,
false,
false
);
Now, you must print $messagearea variable somehow. I think, that the best way is to:
PHP Code:
print_label_row($vbphrase['wysiwyg_editor'], $messagearea);
You also have to wrap that in
<form> </form> with:
PHP Code:
<?php echo (!is_browser('webtv') ? " onsubmit=\"return vB_Editor[$editorid].prepare_submit(0, 0)\"" : ''); ?>
added as a parameter to the
<form opening tab (just put that code before closing > of the opening tag).
You'll have some problems with getting right path to .js, .css and .gif files. You can edit these in
editor_clientscript and
editor_toolbar_on templates but be aware that these files will disappear outside of /admincp/ folder. You've to ways to get that done without a harm:
1) include conditionals like <if condidition="$show[acp_wysiwyg]">../</if>
2) make new set of these templates and new includes/functions_editor.php with replaced template names.
I hope I've helped you somehow. That code isn't the prettiest one but it works. If you wan't more details, help or better code then ask here or via pm.