Beispiel #1
0
 /**
  * Constructor
  * @param string $name Name
  * @param string $caption Caption
  * @param string $value Initial content
  */
 function SpawEditorPage($name, $caption, $value = '', $direction = 'ltr')
 {
     // workaround for names with [ and ]
     $_page_count = SpawConfig::getStaticConfigItem('_page_count');
     if ($_page_count != null) {
         SpawConfig::setStaticConfigItem('_page_count', $_page_count->value + 1);
     } else {
         SpawConfig::setStaticConfigItem('_page_count', 1);
     }
     $_pn = SpawConfig::getStaticConfigValue('_page_count');
     $ctrl_id = str_replace(']', '_', str_replace('[', '_', $name));
     if ($ctrl_id != $name) {
         $ctrl_id = $ctrl_id . '_' . $_pn;
     }
     $this->name = $ctrl_id;
     $this->inputName = $name;
     $this->caption = $caption;
     $this->value = $value;
     $this->direction = $direction;
 }
// specifies in which directions resizing is allowed (values: none, horizontal, vertical, both)
SpawConfig::setStaticConfigItem('resizing_directions', 'vertical', SPAW_CFG_TRANSFER_JS);
// specifies that special characters should be converted to the respective html entities
SpawConfig::setStaticConfigItem('convert_html_entities', false, SPAW_CFG_TRANSFER_JS);
// data for style (css class) dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_style", array('' => 'Normal', 'style1' => 'Style No.1', 'style2' => 'Style No.2'));
// data for style (css class) dropdown in table properties dialog
SpawConfig::setStaticConfigItem("table_styles", array('' => 'Normal', 'style1' => 'Style No.1', 'style2' => 'Style No.2'));
// data for fonts dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_fontname", array('Arial' => 'Arial', 'Courier' => 'Courier', 'Tahoma' => 'Tahoma', 'Times New Roman' => 'Times', 'Verdana' => 'Verdana'));
// data for fontsize dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_fontsize", array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6'));
// data for paragraph dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_formatBlock", array('Normal' => 'Normal', '<H1>' => 'Heading 1', '<H2>' => 'Heading 2', '<H3>' => 'Heading 3', '<H4>' => 'Heading 4', '<H5>' => 'Heading 5', '<H6>' => 'Heading 6', '<pre>' => 'Preformatted', '<address>' => 'Address', '<p>' => 'Paragraph'));
// data for link targets drodown list in hyperlink dialog
SpawConfig::setStaticConfigItem("a_targets", array('_self' => 'Self', '_blank' => 'Blank', '_top' => 'Top', '_parent' => 'Parent'));
// toolbar sets (should start with "toolbarset_"
// standard core toolbars
SpawConfig::setStaticConfigItem('toolbarset_standard', array("format" => "format", "style" => "style", "edit" => "edit", "table" => "table", "plugins" => "plugins", "insert" => "insert", "tools" => "tools"));
// all core toolbars
SpawConfig::setStaticConfigItem('toolbarset_all', array("format" => "format", "style" => "style", "edit" => "edit", "table" => "table", "plugins" => "plugins", "insert" => "insert", "tools" => "tools", "font" => "font"));
// mini core toolbars
SpawConfig::setStaticConfigItem('toolbarset_mini', array("format" => "format_mini", "edit" => "edit", "tools" => "tools"));
// colorpicker config
SpawConfig::setStaticConfigItem('colorpicker_predefined_colors', array('black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', '#fedcba', 'aqua'), SPAW_CFG_TRANSFER_SECURE);
// SpawFm plugin config:
// global filemanager settings
SpawConfig::setStaticConfigItem('PG_SPAWFM_SETTINGS', array('allowed_filetypes' => array('any'), 'allow_modify' => false, 'allow_upload' => false, 'max_upload_filesize' => 0, 'max_img_width' => 0, 'max_img_height' => 0, 'recursive' => false, 'allow_modify_subdirectories' => false, 'allow_create_subdirectories' => false), SPAW_CFG_TRANSFER_SECURE);
// directories
SpawConfig::setStaticConfigItem('PG_SPAWFM_DIRECTORIES', array(array('dir' => SpawConfig::getStaticConfigValue('SPAW_DIR') . 'uploads/flash/', 'caption' => 'Flash movies', 'params' => array('allowed_filetypes' => array('flash'))), array('dir' => SpawConfig::getStaticConfigValue('SPAW_DIR') . 'uploads/images/', 'caption' => 'Images', 'params' => array('default_dir' => true, 'allowed_filetypes' => array('images'))), array('dir' => SpawConfig::getStaticConfigValue('SPAW_DIR') . 'uploads/files/', 'fsdir' => SpawConfig::getStaticConfigValue('SPAW_ROOT') . 'uploads/files/', 'caption' => 'Files', 'params' => array('allowed_filetypes' => array('any')))), SPAW_CFG_TRANSFER_SECURE);
Beispiel #3
0
SpawConfig::setStaticConfigItem("table_styles", array('' => 'Normal', 'style1' => 'Style No.1', 'style2' => 'Style No.2'));
// data for style (css class) dropdown in table cell properties dialog
SpawConfig::setStaticConfigItem("table_cell_styles", array('' => 'Normal', 'style1' => 'Style No.1', 'style2' => 'Style No.2'));
// data for style (css class) dropdown in image properties dialog
SpawConfig::setStaticConfigItem("image_styles", array('' => 'Normal', 'style1' => 'Style No.1', 'style2' => 'Style No.2'));
// data for fonts dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_fontname", array('' => 'Default', 'Arial' => 'Arial', 'Courier' => 'Courier', 'Tahoma' => 'Tahoma', 'Times New Roman' => 'Times', 'Verdana' => 'Verdana'));
// data for fontsize dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_fontsize", array('' => 'Default', '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6'));
// data for paragraph dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_formatBlock", array('<p>' => 'Normal', '<H1>' => 'Heading 1', '<H2>' => 'Heading 2', '<H3>' => 'Heading 3', '<H4>' => 'Heading 4', '<H5>' => 'Heading 5', '<H6>' => 'Heading 6', '<pre>' => 'Preformatted', '<address>' => 'Address'));
// data for link targets drodown list in hyperlink dialog
SpawConfig::setStaticConfigItem("a_targets", array('_self' => 'Self', '_blank' => 'Blank', '_top' => 'Top', '_parent' => 'Parent'));
// data for quick links dropdown (new in 2.0.6)
SpawConfig::setStaticConfigItem("quick_links", array('http://spaweditor.com/' => 'SPAW Editor', 'http://forums.solmetra.com/' => 'SPAW Support Forums', 'http://blog.solmetra.com/' => 'Solmetra\'s Developer Blog'), SPAW_CFG_TRANSFER_SECURE);
// toolbar sets (should start with "toolbarset_"
// standard core toolbars
SpawConfig::setStaticConfigItem('toolbarset_standard', array("format" => "format", "style" => "style", "edit" => "edit", "table" => "table", "plugins" => "plugins", "insert" => "insert", "tools" => "tools"));
// all core toolbars
SpawConfig::setStaticConfigItem('toolbarset_all', array("format" => "format", "style" => "style", "edit" => "edit", "table" => "table", "plugins" => "plugins", "insert" => "insert", "tools" => "tools", "font" => "font"));
// mini core toolbars
SpawConfig::setStaticConfigItem('toolbarset_mini', array("format" => "format_mini", "edit" => "edit", "tools" => "tools"));
// colorpicker config
SpawConfig::setStaticConfigItem('colorpicker_predefined_colors', array('black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', '#fedcba', 'aqua'), SPAW_CFG_TRANSFER_SECURE);
// SpawFm plugin config:
// global filemanager settings
SpawConfig::setStaticConfigItem('PG_SPAWFM_SETTINGS', array('allowed_filetypes' => array('any'), 'allow_modify' => true, 'allow_upload' => true, 'max_upload_filesize' => 0, 'max_img_width' => 0, 'max_img_height' => 0, 'recursive' => false, 'allow_modify_subdirectories' => false, 'allow_create_subdirectories' => false, 'forbid_extensions' => array('php'), 'forbid_extensions_strict' => true), SPAW_CFG_TRANSFER_SECURE);
//echo '/upload/img/'.'<br>'.SpawConfig::getStaticConfigValue('SPAW_DIR').'uploads/flash/';
// directories
SpawConfig::setStaticConfigItem('PG_SPAWFM_DIRECTORIES', array(array('dir' => '/upload/img/', 'caption' => 'Images', 'params' => array('default_dir' => true, 'allowed_filetypes' => array('any'))), array('dir' => '/upload/files/', 'caption' => 'Files', 'params' => array('allowed_filetypes' => array('any')))), SPAW_CFG_TRANSFER_SECURE);
Beispiel #4
0
<?php

// global filetypes definitions
// warning: changing default filetypes may lead to unexpected behaviour
SpawConfig::setStaticConfigItem('PG_SPAWFM_FILETYPES', array('any' => array('.*'), 'images' => array('.jpg', '.gif', '.png'), 'flash' => array('.swf'), 'documents' => array('.doc', '.xls', '.pdf', '.rtf', '.odt', '.ods', '.txt'), 'audio' => array('.wav', '.mp3', '.ogg', '.wma'), 'video' => array('.avi', '.mpg', '.mpeg', '.mov', '.wmv'), 'archives' => array('.zip', '.rar', '.gz')), SPAW_CFG_TRANSFER_SECURE);
// filetypes icons:
// default icons
SpawConfig::setStaticConfigItem('PG_SPAWFM_FILETYPES_ICON_DEFAULT', array('icon' => 'ico_default.gif', 'icon_big' => 'ico_default_big.gif'));
// icons for folders
SpawConfig::setStaticConfigItem('PG_SPAWFM_FILETYPES_ICON_FOLDER', array('icon' => 'ico_folder.gif', 'icon_big' => 'ico_folder_big.gif'));
// icons for specific filetypes (determined by their extensions)
SpawConfig::setStaticConfigItem('PG_SPAWFM_FILETYPES_ICONS', array(array('extensions' => array('.jpg', '.gif', '.png'), 'icon' => 'ico_image.gif', 'icon_big' => 'ico_image_big.gif'), array('extensions' => array('.swf'), 'icon' => 'ico_flash.gif', 'icon_big' => 'ico_flash_big.gif')));
// character to separate base dir path and subdir (should be unused in filesystem names)
SpawConfig::setStaticConfigItem('spawfm_path_separator', '|', SPAW_CFG_TRANSFER_JS);
Beispiel #5
0
<?php

SpawConfig::setStaticConfigItem("dropdown_data_zoom_zoom", array('25%' => '25%', '50%' => '50%', '75%' => '75%', '100%' => '100%', '125%' => '125%', '150%' => '150%', '200%' => '200%', '400%' => '400%'));
Beispiel #6
0
 /**
  * Sets global value for the element of config item provided item's value is an array
  * @param string $name Config item name
  * @param mixed $index Array index
  * @param mixed $value Element value
  */
 function setStaticConfigValueElement($name, $index, $value)
 {
     $cfg_item = SpawConfig::getStaticConfigItem($name);
     if ($cfg_item && is_array($cfg_item->value)) {
         $cfg_item->value[$index] = $value;
         SpawConfig::setStaticConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);
     }
 }
Beispiel #7
0
// data for fonts dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_fontname", array('' => 'Default', 'Arial' => 'Arial', 'Courier' => 'Courier', 'Tahoma' => 'Tahoma', 'Times New Roman' => 'Times', 'Verdana' => 'Verdana'));
// data for fontsize dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_fontsize", array('' => 'Сбросить настройки', '1' => '1', '2' => '2', '3' => 'Стандартный', '4' => '4', '5' => '5', '6' => '6'));
// data for paragraph dropdown list
SpawConfig::setStaticConfigItem("dropdown_data_core_formatBlock", array('<p>' => 'Normal', '<H1>' => 'Heading 1', '<H2>' => 'Heading 2', '<H3>' => 'Heading 3', '<H4>' => 'Heading 4', '<H5>' => 'Heading 5', '<H6>' => 'Heading 6', '<pre>' => 'Preformatted', '<a href=javascript:void(0)>' => 'прозрачность', '<address>' => 'Address'));
// data for link targets drodown list in hyperlink dialog
SpawConfig::setStaticConfigItem("a_targets", array('_self' => 'Self', '_blank' => 'Blank', '_top' => 'Top', '_parent' => 'Parent'));
// data for quick links dropdown (new in 2.0.6)
SpawConfig::setStaticConfigItem("quick_links", array('http://sinergi.ru/' => 'Сайт Южного Окружного Управления Образованием г.Москвы.', 'http://www.educom.ru/' => 'официальный интернет-сайт Департамента образования г.Москвы', 'http://www.uao.mos.ru/' => 'официальный сайт префектуры Южного административного округа'), SPAW_CFG_TRANSFER_SECURE);
// toolbar sets (should start with "toolbarset_"
// standard core toolbars
SpawConfig::setStaticConfigItem('toolbarset_standard', array("format" => "format", "style" => "style", "edit" => "edit", "table" => "table", "plugins" => "plugins", "insert" => "insert", "tools" => "tools", "font" => "font"));
// all core toolbars
SpawConfig::setStaticConfigItem('toolbarset_all', array("format" => "format", "style" => "style", "edit" => "edit", "table" => "table", "plugins" => "plugins", "insert" => "insert", "tools" => "tools", "font" => "font"));
// mini core toolbars
SpawConfig::setStaticConfigItem('toolbarset_mini', array("format" => "format_mini", "edit" => "edit", "tools" => "tools"));
// img core toolbars
SpawConfig::setStaticConfigItem('toolbarset_img', array("insert" => "insert_img"));
// mini + img core toolbars
SpawConfig::setStaticConfigItem('toolbarset_mini_img', array("format" => "format_mini", "edit" => "edit", "tools" => "tools", "insert" => "insert_img"));
// mini + img + color core toolbars
SpawConfig::setStaticConfigItem('toolbarset_mini_font', array("format" => "format", "edit" => "edit", "tools" => "tools", "insert" => "insert_img"));
// colorpicker config
SpawConfig::setStaticConfigItem('colorpicker_predefined_colors', array('black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', '#fedcba', 'aqua'), SPAW_CFG_TRANSFER_SECURE);
// SpawFm plugin config:
// global filemanager settings
SpawConfig::setStaticConfigItem('PG_SPAWFM_SETTINGS', array('allowed_filetypes' => array('any'), 'allow_modify' => true, 'allow_upload' => true, 'chmod_to' => 0777, 'max_upload_filesize' => 5000000, 'max_img_width' => 0, 'max_img_height' => 0, 'recursive' => true, 'allow_modify_subdirectories' => true, 'allow_create_subdirectories' => true, 'forbid_extensions' => array('php'), 'forbid_extensions_strict' => true), SPAW_CFG_TRANSFER_SECURE);
// directories
SpawConfig::setStaticConfigItem('PG_SPAWFM_DIRECTORIES', array(array('dir' => '/uploads/flash/', 'caption' => 'Flash movies', 'params' => array('allowed_filetypes' => array('flash', 'video'))), array('dir' => '/uploads/images/', 'caption' => 'Images', 'params' => array('default_dir' => true, 'allowed_filetypes' => array('images'))), array('dir' => '/uploads/files/', 'caption' => 'Files', 'params' => array('allowed_filetypes' => array('documents', 'archives')))), SPAW_CFG_TRANSFER_SECURE);
Beispiel #8
0
<?php

/*
This script is written for use with PHPMailer-ML when
using the SPAW Editor v.2. It is designed to add a menu option for
variable substitution within an email message body. To use it
you will require the file "inc.campaigns.php" for PHPMailer-ML
version 1.8.1a.
Author: Andy Prevost
License: GPL (see docs/license.txt)
*/
if (isset($this)) {
    $site = $this->config->item('site');
    if (isset($site)) {
        $array_list = array("{cfg name='num_tel'}" => 'Номер телефона: ' . $site['num_tel'], "{cfg name='num_tel2'}" => 'Номер телефона 2: ' . $site['num_tel2'], "{cfg name='num_fax'}" => 'Номер факса: ' . $site['num_fax'], "{cfg name='address'}" => 'Адрес: ' . $site['address'], "{cfg name='postal_code'}" => 'Почтовый индекс: ' . $site['postal_code'], "{cfg name='city'}" => 'Город: ' . $site['city'], "{cfg name='email'}" => 'E-mail: ' . $site['email'], "{cfg name='email2'}" => 'E-mail2: ' . $site['email2'], "{cfg name='www'}" => 'Адрес сайта: ' . $site['www'], "{cfg name='name'}" => 'Название сайта: ' . $site['name'], "{cfg name='short_name'}" => 'Краткое название сайта: ' . $site['short_name']);
    } else {
        $array_list = array();
    }
} else {
    $array_list = array();
}
SpawConfig::setStaticConfigItem("dropdown_data_varinsert_varinsert", $array_list);
Beispiel #9
0
<?php

// Clean paste config
// When to apply cleaning to the pasted content
// "selective" -  when content matches (javascript) regular expression
//                pattern specified in the cofiguration
// "always"
// "never"
SpawConfig::setStaticConfigItem("PG_CLEANPASTE_CLEAN", 'selective', SPAW_CFG_TRANSFER_JS);
// pattern to determine that content should be cleaned in "selective" mode
SpawConfig::setStaticConfigItem("PG_CLEANPASTE_PATTERN", '(urn:schemas-microsoft-com:office)' . '|(<([^>]*)style([\\s]*)=([\\s]*)([\\"]*)mso)' . '|(<([^>]*)class([\\s]*)=([\\s]*)([\\"]*)mso)' . '|(<o:)', SPAW_CFG_TRANSFER_JS);