Dankness |
12-13-2006 10:21 PM |
Using the WYSIWYG editor??
Hello, iv been working on a HTML Manual viewer for my javaautodoc manuals for awhile now and most of it is done, I have figured out how to use the QuickReply editor in this process but i really wanted to add the smileys and what not's to it also. So far i know i am quite close on figuring this out but i was wondering if anyone might be able to help me because i think its just one of these settings arent correct... As i stated above this does work with the quick edit just i get no toolbars, here's my function to pull the editor and fill in your current text(its from the edit function) and maybe someone can help me with this.
O yea here's the list of options i found inside of functions_editor.php which i based my settings on.
PHP Code:
/** * Prepares the templates for a message editor * * @param string The text to be initially loaded into the editor * @param boolean Is the initial text HTML (rather than plain text or bbcode)? * @param mixed Forum ID of the forum into which we are posting. Special rules apply for values of 'privatemessage', 'usernote', 'calendar', 'announcement' and 'nonforum' * @param boolean Allow smilies? * @param boolean Parse smilies in the text of the message? * @param boolean Allow attachments? * @param string Editor type - either 'fe' for full editor or 'qr' for quick reply * @param string Force the editor to use the specified value as its editorid, rather than making one up * * @return string Editor ID * function construct_edit_toolbar($text = '', $ishtml = false, $forumid = 0, $allowsmilie = true, $parsesmilie = true, $can_attach = false, $editor_type = 'fe', $force_editorid = '') */
PHP Code:
if (!empty($_REQUEST['edit'])) { $TABLE_PREFIXA= "manual_"; if (!($permissions['manualpermissions'] & $vbulletin->bf_ugp['manualpermissions']['cancomment'])) { print_no_permission(); }
$vbulletin->input->clean_array_gpc('r', array( 'edit' => TYPE_INT, ));
$id = $vbulletin->GPC['edit']; $exists = $db->query_first("SELECT * FROM " . $TABLE_PREFIXA . "comments WHERE id = '" . $id . "'"); if (empty($exists)) { } else { if ( $exists['userid'] == $vbulletin->userinfo['userid'] ) {
global $page; global $text; global $id;
$page = $exists['page']; $text = $exists['text']; $id = $exists['id']; $navbits = construct_navbits(array("SRLManual3.php?$session[sessionurl]" => $vbphrase['manual_title'], $vbphrase['manual_edit']));
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;
$vbulletin->options['allowbbcode'] = $setting['allow_bbcode']; $vbulletin->options['allowbbimagecode'] = $setting['allow_imgcode']; $editorid = construct_edit_toolbar($text, 0, 'nonforum', ($setting['allow_smilies'] ? 1 : 0), 1, false, 'fe');
eval('$navbar = "' . fetch_template('navbar') . '";'); exec_switch_bg(); eval('print_output("' . fetch_template('manual_editcomment') . '");'); } } }
Anyways thank you for your time. Also you may find a live DEMO in progress at
www.villu-reborn.com/SRLManual3.php?do=Test
|