vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Using the WYSIWYG editor?? (https://vborg.vbsupport.ru/showthread.php?t=133951)

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($text0'nonforum', ($setting['allow_smilies'] ? 0), 1false'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


All times are GMT. The time now is 06:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01078 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete