1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
<?php require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../class/config.class.php'); require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../class/util.class.php');
// sets physical filesystem directory of web site root // if calculation fails (usually if web server is not apache) set this manually SpawConfig::setStaticConfigItem('DOCUMENT_ROOT', str_replace("\\","/",SpawVars::getServerVar("DOCUMENT_ROOT"))); if (!ereg('/$', SpawConfig::getStaticConfigValue('DOCUMENT_ROOT'))) SpawConfig::setStaticConfigItem('DOCUMENT_ROOT', SpawConfig::getStaticConfigValue('DOCUMENT_ROOT').'/');
// sets physical filesystem directory where spaw files reside // should work fine most of the time but if it fails set SPAW_ROOT manually by providing correct path SpawConfig::setStaticConfigItem('SPAW_ROOT', str_replace("\\","/",realpath(dirname(__FILE__)."/..").'/')); // sets virtual path to the spaw directory on the server // if calculation fails set this manually SpawConfig::setStaticConfigItem('SPAW_DIR', '/'.str_replace(SpawConfig::getStaticConfigValue("DOCUMENT_ROOT"),'',SpawConfig::getStaticConfigValue("SPAW_ROOT")));
// DEFAULTS used when no value is set from code // language SpawConfig::setStaticConfigItem('default_lang','en'); // output charset (empty strings means charset specified in language file) SpawConfig::setStaticConfigItem('default_output_charset',''); // theme SpawConfig::setStaticConfigItem('default_theme','spaw1');
// stylesheet SpawConfig::setStaticConfigItem('default_stylesheet',SpawConfig::getStaticConfigValue('SPAW_DIR').'main.css'); // width SpawConfig::setStaticConfigItem('default_width','100%'); // height SpawConfig::setStaticConfigItem('default_height','200px');
// specifies if language subsystem should use iconv functions to convert strings to the specified charset SpawConfig::setStaticConfigItem('USE_ICONV',true); // specifies rendering mode to use: "xhtml" - renders using spaw's engine, "builtin" - renders using browsers engine SpawConfig::setStaticConfigItem('rendering_mode', 'xhtml', SPAW_CFG_TRANSFER_JS); // specifies that xhtml rendering engine should indent it's output SpawConfig::setStaticConfigItem('beautify_xhtml_output', true, SPAW_CFG_TRANSFER_JS); // specifies host and protocol part (like http://mydomain.com) that should be added to urls returned from file manager (and probably other places in the future) SpawConfig::setStaticConfigItem('base_href', '', SPAW_CFG_TRANSFER_JS); // specifies if spaw should strip domain part from absolute urls (IE makes all links absolute) SpawConfig::setStaticConfigItem('strip_absolute_urls', false, SPAW_CFG_TRANSFER_JS); // specifies in which directions resizing is allowed (values: none, horizontal, vertical, both) SpawConfig::setStaticConfigItem('resizing_directions', 'vertical', SPAW_CFG_TRANSFER_JS);
// data for style (css class) dropdown list SpawConfig::setStaticConfigItem("dropdown_data_core_style", array( '' => 'Normal', 'stTitleL' => 'Title Large Blue', 'stTitleS' => 'Title Small Blue', 'stSubtitleM' => 'Subtitle', 'stTextL' => 'Large Text', 'stTextN' => 'Normal Text', 'stTestS' => 'Small Text', ) ); // data for style (css class) dropdown in table properties dialog SpawConfig::setStaticConfigItem("table_styles", array( '' => 'Normal', ) ); // 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' ) ); // 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" ) );
// toolbarset SpawConfig::setStaticConfigItem('default_toolbarset','all');
// SpawFm plugin config:
// global filemanager settings SpawConfig::setStaticConfigItem( 'PG_SPAWFM_SETTINGS', array( 'allow_upload' => true, // allow uploading new files in directory 'allow_modify' => false, // allow edit filenames/delete files in directory 'max_upload_filesize' => 0, // max upload file size allowed in bytes, or 0 to ignore 'allowed_filetypes' => array('any'), // allowed filetypes groups/extensions //'view_mode' => 'list', // directory view mode: list/details/thumbnails - TO DO //'thumbnails_enabled' => true, // enable thumbnails view mode - TO DO //'allow_create_subdir' => true, // allow creating subdirectories - TO DO //'recursive' => true, // allow entering subdirectories - TO DO ), SPAW_CFG_TRANSFER_SECURE );
// directories SpawConfig::setStaticConfigItem(
/* 'PG_SPAWFM_DIRECTORIES', array( array( 'dir' => SpawConfig::getStaticConfigValue('SPAW_DIR').'../flash/', 'caption' => 'Flash movies', 'params' => array( 'allowed_filetypes' => array('flash') ) ), array( 'dir' => 'img/library/', 'caption' => 'Images', 'params' => array( 'default_dir' => true, // set directory as default (optional setting) 'allowed_filetypes' => array('images') ) ), ),*/
'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, // set directory as default (optional setting) 'allowed_filetypes' => array('images') ) ), array( 'dir' => SpawConfig::getStaticConfigValue('SPAW_DIR').'uploads/files/', 'fsdir' => SpawConfig::getStaticConfigValue('SPAW_ROOT').'uploads/files/', // optional absolute physical filesystem path 'caption' => 'Files', 'params' => array( 'allowed_filetypes' => array('any') ) ), ),
SPAW_CFG_TRANSFER_SECURE ); ?>
|