Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 12-13-2006, 10:21 PM
Dankness Dankness is offline
 
Join Date: Nov 2006
Location: Myrtle Beach,SC
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03625 seconds
  • Memory Usage 2,224KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete