'canbbcodealign']) ? true : false; $show['list_bbcode'] = ($sig_perms & $sig_perms_bits['canbbcodelist']) ? true : false; $show['code_bbcode'] = ($sig_perms & $sig_perms_bits['canbbcodecode']) ? true : false; $show['html_bbcode'] = ($sig_perms & $sig_perms_bits['canbbcodehtml']) ? true : false; $show['php_bbcode'] = ($sig_perms & $sig_perms_bits['canbbcodephp']) ? true : false; $show['url_bbcode'] = ($sig_perms & $sig_perms_bits['canbbcodelink']) ? true : false; $show['quote_bbcode'] = ($sig_perms & $sig_perms_bits['canbbcodequote']) ? true : false; } else { require_once(DIR . '/includes/class_bbcode.php'); $show['font_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_FONT) ? true : false; $show['size_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_SIZE) ? true : false; $show['color_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_COLOR) ? true : false; $show['basic_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_BASIC) ? true : false; $show['align_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ALIGN) ? true : false; $show['list_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_LIST) ? true : false; $show['code_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_CODE) ? true : false; $show['html_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_HTML) ? true : false; $show['php_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_PHP) ? true : false; $show['url_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_URL) ? true : false; $show['quote_bbcode'] = true; // can't disable this anywhere but in sigs } if (empty($forumid)) { $forumid = 'nonforum'; } switch($forumid) { case 'privatemessage': $can_toolbar = $vbulletin->options['privallowbbcode']; $show['img_bbcode'] = $vbulletin->options['privallowbbimagecode']; break; case 'usernote': $can_toolbar = $vbulletin->options['unallowvbcode']; $show['img_bbcode'] = $vbulletin->options['unallowimg']; break; case 'calendar': global $calendarinfo; $can_toolbar = $calendarinfo['allowbbcode']; $show['img_bbcode'] = $calendarinfo['allowimgcode']; break; case 'announcement': $can_toolbar = true; $show['img_bbcode'] = true; break; case 'signature': // see above -- these are handled earlier break; case 'nonforum': $can_toolbar = $vbulletin->options['allowbbcode']; $show['img_bbcode'] = $vbulletin->options['allowbbimagecode']; break; default: $forum = fetch_foruminfo($forumid); $can_toolbar = $forum['allowbbcode']; $show['img_bbcode'] = $forum['allowimages']; break; } // set the editor mode if (isset($_REQUEST['wysiwyg'])) { // 2 = wysiwyg; 1 = standard if ($_REQUEST['wysiwyg']) { $vbulletin->userinfo['showvbcode'] = 2; } else if ($vbulletin->userinfo['showvbcode'] == 0) { $vbulletin->userinfo['showvbcode'] = 0; } else { $vbulletin->userinfo['showvbcode'] = 1; } } $toolbartype = $can_toolbar ? is_wysiwyg_compatible(-1, $editor_type) : 0; $show['wysiwyg_compatible'] = (is_wysiwyg_compatible(2, $editor_type) == 2); $show['editor_toolbar'] = ($toolbartype > 0); switch ($editor_type) { case 'qr': if ($force_editorid == '') { $editorid = 'vB_Editor_QR'; } else { $editorid = $force_editorid; } $editor_height = 100; $editor_template_name = 'showthread_quickreply'; break; case 'qe': if ($force_editorid == '') { $editorid = 'vB_Editor_QE'; } else { $editorid = $force_editorid; } $editor_height = 100; $editor_template_name = 'postbit_quickedit'; break; default: if ($force_editorid == '') { $editorid = 'vB_Editor_' . str_pad(++$editorcount, 3, 0, STR_PAD_LEFT); } else { $editorid = $force_editorid; } // set the height of the editor based on the editor_height cookie if it exists $editor_height = $vbulletin->input->clean_gpc('c', 'editor_height', TYPE_UINT); $editor_height = ($editor_height > 100) ? $editor_height : 250; $editor_template_name = ($toolbartype ? 'editor_toolbar_on' : 'editor_toolbar_off'); break; } // init the variables used by the templates built by this function $vBeditJs = array( 'font_options_array' => '', 'size_options_array' => '', 'istyle_array' => '', 'normalmode' => 'false' ); $vBeditTemplate = array( 'extrabuttons' => '', 'clientscript' => '', 'fontfeedback' => '', 'sizefeedback' => '', 'smiliepopup' => '' ); ($hook = vBulletinHook::fetch_hook('editor_toolbar_start')) ? eval($hook) : false; // show a post editing toolbar of some sort if ($show['editor_toolbar']) { if ($can_attach) { $show['attach'] = true; } $vBeditJs = construct_editor_js_arrays(); // get extra buttons... experimental at the moment $vBeditTemplate['extrabuttons'] = construct_editor_extra_buttons($editorid); if ($toolbartype == 2) { // got to parse the message to be displayed from bbcode into HTML if ($text !== '') { require_once(DIR . '/includes/functions_wysiwyg.php'); $newpost['message'] = parse_wysiwyg_html($text, $ishtml, $forumid, iif($allowsmilie AND $parsesmilie, 1, 0)); } else { $newpost['message'] = ''; } $newpost['message'] = htmlspecialchars_uni($newpost['message']); } else { $newpost['message'] = $text; // set mode based on cookie set by javascript /*$vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'vbcodemode', TYPE_INT); $modechecked[$vbulletin->GPC[COOKIE_PREFIX . 'vbcodemode']] = 'checked="checked"';*/ } } else { // do not show a post editing toolbar $newpost['message'] = $text; } // disable smilies option and clickable smilie $show['smiliebox'] = false; $smiliebox = ''; $disablesmiliesoption = ''; if ($editor_type == 'qr') { // no smilies } else if ($allowsmilie AND $show['editor_toolbar']) { // deal with disable smilies option if (!isset($checked['disablesmilies'])) { $vbulletin->input->clean_gpc('r', 'disablesmilies', TYPE_BOOL); $checked['disablesmilies'] = iif($vbulletin->GPC['disablesmilies'], 'checked="checked"'); } eval('$disablesmiliesoption = "' . fetch_template('newpost_disablesmiliesoption') . '";'); if ($toolbartype AND ($vbulletin->options['smtotal'] > 0 OR $vbulletin->options['wysiwyg_smtotal'] > 0)) { // query smilies $smilies = $vbulletin->db->query_read_slave(" SELECT smilieid, smilietext, smiliepath, smilie.title, imagecategory.title AS category FROM " . TABLE_PREFIX . "smilie AS smilie LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid) ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder "); // get total number of smilies $totalsmilies = $vbulletin->db->num_rows($smilies); if ($totalsmilies > 0) { if ($vbulletin->options['wysiwyg_smtotal'] > 0) { $show['wysiwygsmilies'] = true; // smilie dropdown menu $vBeditJs['smilie_options_array'] = array(); $i = 0; while ($smilie = $vbulletin->db->fetch_array($smilies)) { if (empty($prevcategory)) { $prevcategory = $smilie['category']; } if ($i++ < $vbulletin->options['wysiwyg_smtotal']) { $vBeditJs['smilie_options_array']["$smilie[category]"][] = "\t\t'$smilie[smilieid]' : new Array('" . addslashes_js($smilie['smiliepath']) . "', '" . addslashes_js($smilie['smilietext']) . "', '" . addslashes_js($smilie['title']) . "')"; } else { $vBeditJs['smilie_options_array']["$prevcategory"][] = "\t\t'more' : '" . addslashes_js($vbphrase['show_all_smilies']) . "'\n"; break; } $prevcategory = $smilie['category']; } foreach (array_keys($vBeditJs['smilie_options_array']) AS $category) { $vBeditJs['smilie_options_array']["$category"] = "\t'" . addslashes_js($category) . "' : {\n" . implode(",\n", $vBeditJs['smilie_options_array']["$category"]) . "}"; } $vBeditJs['smilie_options_array'] = "\n" . implode(",\n", $vBeditJs['smilie_options_array']); } else { $show['wysiwygsmilies'] = false; } // clickable smilie box if ($vbulletin->options['smtotal']) { $vbulletin->db->data_seek($smilies, 0); $i = 0; $bits = array(); while ($smilie = $vbulletin->db->fetch_array($smilies) AND $i++ < $vbulletin->options['smtotal']) { $smiliehtml = "\"""; eval('$bits[] = "' . fetch_template('editor_smilie') . '";'); if (sizeof($bits) == $vbulletin->options['smcolumns']) { $smiliecells = implode('', $bits); eval('$smiliebits .= "' . fetch_template('editor_smiliebox_row') . '";'); $bits = array(); } } // fill in empty cells if required $remaining = sizeof($bits); if ($remaining > 0) { $remainingcolumns = $vbulletin->options['smcolumns'] - $remaining; eval('$bits[] = "' . fetch_template('editor_smiliebox_straggler') . '";'); $smiliecells = implode('', $bits); eval('$smiliebits .= "' . fetch_template('editor_smiliebox_row') . '";'); } $show['moresmilieslink'] = iif ($totalsmilies > $vbulletin->options['smtotal'], true, false); $show['smiliebox'] = true; } $vbulletin->db->free_result($smilies); } } eval('$smiliebox = "' . fetch_template('editor_smiliebox') . '";'); } ($hook = vBulletinHook::fetch_hook('editor_toolbar_end')) ? eval($hook) : false; eval('$vBeditTemplate[\'clientscript\'] = "' . fetch_template('editor_clientscript') . '";'); $editortype = ($toolbartype == 2 ? 1 : 0); $show['is_wysiwyg_editor'] = intval($editortype); eval('$messagearea = "' . fetch_template($editor_template_name) . '";'); return $editorid; } // ############################################################################# /** * Returns the extra buttons as defined by the bbcode editor * * @param string ID of the editor of which these buttons will be a part * * @return string Extra buttons HTML */ function construct_editor_extra_buttons($editorid) { global $vbphrase, $vbulletin; $extrabuttons = ''; foreach ($vbulletin->bbcodecache AS $bbcode) { if ($bbcode['buttonimage'] != '') { $tag = strtoupper($bbcode['bbcodetag']); $alt = construct_phrase($vbphrase['wrap_x_tags'], $tag); $extrabuttons .= "
\"$alt\"
\n"; } } return $extrabuttons; } /*======================================================================*\ || #################################################################### || # CVS: $RCSfile: functions_editor.php,v $ - $Revision: 1.54 $ || #################################################################### \*======================================================================*/ ?>
Fatal error: Call to undefined function: fetch_textarea_width() in d:\appserv\www\gamesangnhuong\calendar.php on line 295