示例#1
0
 function MoodleQuickForm_textarea($elementName = null, $elementLabel = null, $attributes = null)
 {
     parent::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
 }
示例#2
0
 function HTML_QuickForm_fckeditor($elementName = null, $elementLabel = null, $attributes = null, $options = null)
 {
     include_once BASE_DIR . '/nterchange/javascripts/fckeditor/fckeditor.php';
     $this->_editor = new FCKEditor($elementName);
     $settings_model =& NModel::factory('cms_settings');
     $editor_set = $settings_model->getSetting(SETTINGS_EDITOR);
     unset($settings_model);
     if ($editor_set == false || !$this->_editor->IsCompatible()) {
         HTML_QuickForm_textarea::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
         // if the browser isn't compatible, then remove _editor parameter and set up as a textarea
         unset($this->_editor);
         $this->updateAttributes(array('rows' => 25, 'cols' => 60, 'style' => 'width:470px;height:500px;'));
     } else {
         HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
         $this->_type = 'fckeditor';
         $this->_persistantFreeze = true;
         // set base options and paths
         $this->_editor->BasePath = '/nterchange/javascripts/fckeditor/';
         $this->_editor->Width = '470px';
         $this->_editor->Height = '500px';
         if (file_exists(DOCUMENT_ROOT . '/includes/fckstyles.xml')) {
             $this->_editor_config['StylesXmlPath'] = '/includes/fckstyles.xml';
         }
         if (file_exists(DOCUMENT_ROOT . '/includes/fcktemplates.xml')) {
             $this->_editor_config['TemplatesXmlPath'] = '/includes/fcktemplates.xml';
         }
         // overwrite any set $_editor_options with the passed $options, only allowing the ones that already exist
         if (is_array($options)) {
             foreach ($options as $option => $val) {
                 if (in_array($option, array_keys($this->_editor_config))) {
                     $this->_editor_config[$option] = $val;
                 }
             }
         }
         // load any $_editor_options that are not null into the $_editor->Config array
         foreach ($this->_editor_config as $option => $val) {
             if (!is_null($val)) {
                 $this->_editor->Config[$option] = $val;
             }
         }
         // point at nterchange custom configuration file
         if (file_exists(DOCUMENT_ROOT . '/javascripts/fckconfig.js')) {
             $this->_editor->Config['CustomConfigurationsPath'] = '/javascripts/fckconfig.js?' . filemtime(DOCUMENT_ROOT . '/javascripts/fckconfig.js');
         } else {
             $this->_editor->Config['CustomConfigurationsPath'] = $this->_editor->BasePath . 'n_config.js?' . filemtime(BASE_DIR . '/nterchange/javascripts/fckeditor/n_config.js');
         }
         // set the toolbar to our configured toolbar
         $this->_editor->ToolbarSet = 'nonfiction';
     }
 }
示例#3
0
 /**
  * Class constructor
  * 
  * @param  string $elementName  Input field name attribute
  * @param  mixed  $elementLabel Label(s) for a field
  * @param  mixed  $attributes   Either a typical HTML attribute string or an associative array
  * @access public
  * @since  1.0
  */
 function HTML_QuickForm_wikiarea($elementName = null, $elementLabel = null, $attributes = null)
 {
     HTML_QuickForm_textarea::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
 }
示例#4
0
 function HTML_QuickForm_htmlarea($elementName = null, $elementLabel = null, $attributes = null)
 {
     HTML_QuickForm_textarea::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
     $this->_type = 'htmlarea';
 }