PDA

View Full Version : How i Define Vb Editor on Modification


omardealo
02-15-2016, 11:52 AM
Heloo ,

i make a Modification with Custom Page and i want to add Vb Editor to this page .


i used this code on hook : misc_start

require_once(DIR . '/includes/functions_editor.php');
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible() : 0);
$istyles_js = construct_editor_styles_js();
$show['qr_require_click'] = 0;
$editorid = construct_edit_toolbar('', 0, 0, $vbulletin->options['allowsmilies'], 1, 0);
$messagearea = "
<script type=\"text/javascript\">
<!--
var require_click = false;
var threaded_mode = 1;
var is_last_page = false;
// -->
</script>
$messagearea
";


it is working and show the editor but i have one error on the page
Warning: Invalid argument supplied for foreach() in [path]\includes\functions_editor.php on line 710

if i used same code in php file with Define it works so good without any problem
define('GET_EDIT_TEMPLATES', true);
but how i use same code with a Modification or where is a problem ?