Beispiel #1
0
    /**
     * Constructor
     *
     * @param	object	$form	the form calling the editor selection
     * @param	string	$name	editor name
     * @param	string	$value	Pre-selected text value
     * @param	bool	$noHtml  dohtml disabled
     */
    public function __construct(&$form, $name = "editor", $value = NULL, $noHtml = FALSE)
    {
        global $icmsConfig;
        if (empty($value)) {
            $value = $icmsConfig['editor_default'];
        }
        parent::__construct(_SELECT);
        $edtlist = icms_plugins_EditorHandler::getListByType();
        $option_select = new icms_form_elements_Select("", $name, $value);
        $querys = preg_replace('/editor=(.*?)&/', '', $_SERVER['QUERY_STRING']);
        $extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
				window.location = \'?editor=\'+this.options[this.selectedIndex].value+\'&' . $querys . '\';
			}"';
        $option_select->setExtra($extra);
        $option_select->addOptionArray($edtlist);
        $this->addElement($option_select);
    }
Beispiel #2
0
 /**
  * Gets list of editors folders inside editors directory
  * @deprecated	Use icms_core_Filesystem::getDirList or icms_plugins_EditorHandler::getList
  * @todo		Remove in 1.4
  *
  * @param	string	 $type			type of editor
  * @return  array	 $editor_list   list of files in the directory
  */
 public static function getEditorsList($type = '')
 {
     icms_core_Debug::setDeprecated('icms_plugins_EditorHandler::getListByType', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
     return icms_plugins_EditorHandler::getListByType($type);
 }
Beispiel #3
0
				case 'editor_source' :
					$type = explode('_', $config[$i]->getVar('conf_formtype'));
					$ele = new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
					$type = array_pop($type);
					if ($type == 'editor') $type = '';
					$dirlist = icms_plugins_EditorHandler::getListByType($type);
					if (! empty($dirlist)) {
						asort($dirlist);
						$ele->addOptionArray($dirlist);
					}
					unset($type);
					break;

				case 'editor_multi' :
					$ele = new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, TRUE);
					$dirlist = icms_plugins_EditorHandler::getListByType();
					if (! empty($dirlist)) {
						asort($dirlist);
						$ele->addOptionArray($dirlist);
					}
					break;

				case 'select_font' :
					$ele = new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
					$dirlist = icms_core_Filesystem::getFileList(ICMS_LIBRARIES_PATH . '/icms/form/elements/captcha/fonts/', '', array('ttf'));
					if (! empty($dirlist)) {
						asort($dirlist);
						$ele->addOptionArray($dirlist);
					}
					break;