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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
|
<?php
// ------------------------------------------------------------------------------- // | net2ftp: a web based FTP client | // | Copyright (c) 2003-2006 by David Gartner | // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // -------------------------------------------------------------------------------
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function getActivePlugins() {
// -------------- // This function modifies the global variable $net2ftp_globals["activePlugins"], which contains an array // with all active plugin names // // Which plugin is active depends on 2 things: // 1 - if the plugin is enabled or disabled (see the ["use"] field in getPluginProperties()) // 2 - the $net2ftp_globals["state"] and $net2ftp_globals["state2"] variables, as well as other specific variables (see this function) // --------------
// ------------------------------------------------------------------------- // Global variables // ------------------------------------------------------------------------- global $net2ftp_globals; $pluginProperties = getPluginProperties("ALL"); $plugincounter = 0; $activePlugins = array(); if (isset($_POST["textareaType"]) == true) { $textareaType = $_POST["textareaType"]; }
// ------------------------------------------------------------------------- // Plugins to always activate // -------------------------------------------------------------------------
// ------------------------------------------------------------------------- // Plugins to activate depending on the $state and $state2 variables // ------------------------------------------------------------------------- if ($net2ftp_globals["state"] == "logout" || $net2ftp_globals["state"] == "admin") { if ($pluginProperties["versioncheck"]["use"] == "yes") { $activePlugins[$plugincounter] = "versioncheck"; $plugincounter++; } } elseif ($net2ftp_globals["state"] == "findstring") { if ($pluginProperties["jscalendar"]["use"] == "yes") { $activePlugins[$plugincounter] = "jscalendar"; $plugincounter++; } } elseif ($net2ftp_globals["state"] == "view") { if ($pluginProperties["geshi"]["use"] == "yes") { $activePlugins[$plugincounter] = "geshi"; $plugincounter++; } }
// ------------------------------------------------------------------------- // Plugins to activate depending on other variables // ------------------------------------------------------------------------- if ($net2ftp_globals["state"] == "edit" && isset($textareaType) == true && $textareaType != "" && array_key_exists($textareaType, $pluginProperties) == true) { if ($pluginProperties[$textareaType]["use"] == "yes") { $activePlugins[$plugincounter] = $textareaType; $plugincounter++; } }
return $activePlugins;
} // end function getActivePlugins
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function isActivePlugin($plugin) {
// -------------- // This function checks if a plugin is active or not // --------------
global $net2ftp_globals; return in_array($plugin, $net2ftp_globals["activePlugins"]);
} // end function isActivePlugin
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function getPluginProperties() {
// -------------- // This function returns an array with all plugin properties // --------------
// ------------------------------------------------------------------------- // Global variables // ------------------------------------------------------------------------- global $net2ftp_globals;
// ------------------------------------------------------------------------- // HTMLArea 3 rc3 // http://www.htmlarea.com/forum/htmlArea_3_(beta)_C4/htmlArea_v3.0_-_Discussion_F14/htmlarea_3.0_-_Release_Candidate_3_P37828/ // An HTML editor // -------------------------------------------------------------------------
/* -------------------------------------------------------------------------
// THE HTMLAREA EDITOR IS NOT INCLUDED WITH NET2FTP ANY MORE, AS ITS DEVELOPMENT SEEMS TO HAVE STOPPED.
// Language code (see /plugins/htmlarea/lang) if ($net2ftp_globals["language"] == "cs") { $htmlarea_language = "cz"; } elseif ($net2ftp_globals["language"] == "de") { $htmlarea_language = "de"; } elseif ($net2ftp_globals["language"] == "es") { $htmlarea_language = "es"; } elseif ($net2ftp_globals["language"] == "fr") { $htmlarea_language = "fr"; } elseif ($net2ftp_globals["language"] == "it") { $htmlarea_language = "it"; } elseif ($net2ftp_globals["language"] == "nl") { $htmlarea_language = "nl"; } elseif ($net2ftp_globals["language"] == "pl") { $htmlarea_language = "pl"; } elseif ($net2ftp_globals["language"] == "pt") { $htmlarea_language = "pt_br"; } elseif ($net2ftp_globals["language"] == "ru") { $htmlarea_language = "ru"; } elseif ($net2ftp_globals["language"] == "tc") { $htmlarea_language = "b5"; } elseif ($net2ftp_globals["language"] == "zh") { $htmlarea_language = "ch"; } else { $htmlarea_language = "en"; }
// THE HTMLAREA EDITOR IS NOT INCLUDED WITH NET2FTP ANY MORE, AS ITS DEVELOPMENT SEEMS TO HAVE STOPPED.
$pluginProperties["htmlarea"]["use"] = "no"; $pluginProperties["htmlarea"]["label"] = "HTMLArea"; $pluginProperties["htmlarea"]["directory"] = "htmlarea"; $pluginProperties["htmlarea"]["type"] = "textarea"; $pluginProperties["htmlarea"]["browsers"][1] = "IE"; $pluginProperties["htmlarea"]["browsers"][2] = "Opera"; $pluginProperties["htmlarea"]["browsers"][3] = "Mozilla"; $pluginProperties["htmlarea"]["browsers"][4] = "Other"; $pluginProperties["htmlarea"]["filename_extensions"][1] = "html"; $pluginProperties["htmlarea"]["includePhpFiles"][1] = ""; $pluginProperties["htmlarea"]["printJavascript"] = "<script type=\"text/javascript\">\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "_editor_url = \"./plugins/htmlarea/\";\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "_editor_lang = \"$htmlarea_language\";\n"; // 2-letter code; see /htmlarea/lang/XX.js files $pluginProperties["htmlarea"]["printJavascript"] .= "</script>\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/htmlarea/htmlarea.js\"></script>\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "<script type=\"text/javascript\">\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"TableOperations\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"SpellChecker\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"FullPage\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"CSS\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"ContextMenu\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"ListType\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"CharacterMap\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " HTMLArea.loadPlugin(\"DynamicCSS\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "var editor = null;\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "function initEditor() {\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // create an editor for the \"text\" textbox\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor = new HTMLArea(\"text\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // register the FullPage plugin\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.registerPlugin(FullPage);\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // register the TableOperations plugin\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.registerPlugin(TableOperations);\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // register the SpellChecker plugin\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.registerPlugin(SpellChecker);\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // register the ListType plugin\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.registerPlugin(ListType);\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // register the DynamicCSS plugin\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "editor.registerPlugin(DynamicCSS);\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // register the CSS plugin\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.registerPlugin(CSS, {\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " combos : [\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " { label: \"Syntax:\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // menu text // CSS class\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " options: { \"None\" : \"\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Code\" : \"code\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"String\" : \"string\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Comment\" : \"comment\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Variable name\" : \"variable-name\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Type\" : \"type\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Reference\" : \"reference\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Preprocessor\" : \"preprocessor\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Keyword\" : \"keyword\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Function name\" : \"function-name\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Html tag\" : \"html-tag\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Html italic\" : \"html-helper-italic\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Warning\" : \"warning\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Html bold\" : \"html-helper-bold\"\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " },\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " context: \"pre\"\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " },\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " { label: \"Info:\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " options: { \"None\" : \"\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Quote\" : \"quote\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Highlight\" : \"highlight\",\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " \"Deprecated\" : \"deprecated\"\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " }\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " }\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " ]\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " });\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // add a contextual menu\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.registerPlugin(\"ContextMenu\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " // load the stylesheet used by our CSS plugin configuration\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.config.pageStyle = \"@import url(custom.css);\";\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.generate();\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " return false;\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "}\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "HTMLArea.onload = initEditor;\n\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "function insertHTML() {\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " var html = prompt(\"Enter some HTML code here\");\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " if (html) {\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.insertHTML(html);\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " }\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "}\n\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "function highlight() {\n"; $pluginProperties["htmlarea"]["printJavascript"] .= " editor.surroundHTML('<span style=\"background-color: yellow\">','</span>');\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "}\n\n"; $pluginProperties["htmlarea"]["printJavascript"] .= "</script>\n"; $pluginProperties["htmlarea"]["printCss"] = ""; $pluginProperties["htmlarea"]["printBodyOnload"] = "HTMLArea.init();";
// THE HTMLAREA EDITOR IS NOT INCLUDED WITH NET2FTP ANY MORE, AS ITS DEVELOPMENT SEEMS TO HAVE STOPPED.
------------------------------------------------------------------------- */
// ------------------------------------------------------------------------- // FCKEditor - http://www.fckeditor.net/ // An HTML editor // -------------------------------------------------------------------------
// Language code (see /plugins/fckeditor/editor/lang) // See /modules/edit/edit.inc.php: // if ($net2ftp_globals["language"] == "cs") { $fckeditor_language = "cs"; } // elseif ($net2ftp_globals["language"] == "de") { $fckeditor_language = "de"; } // elseif ($net2ftp_globals["language"] == "es") { $fckeditor_language = "es"; } // elseif ($net2ftp_globals["language"] == "fr") { $fckeditor_language = "fr"; } // elseif ($net2ftp_globals["language"] == "it") { $fckeditor_language = "it"; } // elseif ($net2ftp_globals["language"] == "nl") { $fckeditor_language = "nl"; } // elseif ($net2ftp_globals["language"] == "pl") { $fckeditor_language = "pl"; } // elseif ($net2ftp_globals["language"] == "pt") { $fckeditor_language = "pt"; } // elseif ($net2ftp_globals["language"] == "ru") { $fckeditor_language = "ru"; } // elseif ($net2ftp_globals["language"] == "tc") { $fckeditor_language = "zh"; } // elseif ($net2ftp_globals["language"] == "zh") { $fckeditor_language = "zh-cn"; } // else { $fckeditor_language = "en"; }
$pluginProperties["fckeditor"]["use"] = "yes"; $pluginProperties["fckeditor"]["label"] = "FCKEditor"; $pluginProperties["fckeditor"]["directory"] = "fckeditor"; $pluginProperties["fckeditor"]["type"] = "textarea"; $pluginProperties["fckeditor"]["browsers"][1] = "IE"; $pluginProperties["fckeditor"]["browsers"][2] = "Mozilla"; $pluginProperties["fckeditor"]["browsers"][3] = "Opera"; $pluginProperties["fckeditor"]["browsers"][4] = "Other"; $pluginProperties["fckeditor"]["filename_extensions"][1] = "html"; $pluginProperties["fckeditor"]["includePhpFiles"][1] = "fckeditor/fckeditor.php"; $pluginProperties["fckeditor"]["printJavascript"] = "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/fckeditor/fckeditor.js\"></script>\n"; $pluginProperties["fckeditor"]["printCss"] = ""; $pluginProperties["fckeditor"]["printBodyOnload"] = "";
// ------------------------------------------------------------------------- // TinyMCE - http://tinymce.moxiecode.com/ // An HTML editor // -------------------------------------------------------------------------
// Language code (see /plugins/tinymce/lang) if ($net2ftp_globals["language"] == "cs") { $tinymce_language = "cs"; } elseif ($net2ftp_globals["language"] == "de") { $tinymce_language = "de"; } elseif ($net2ftp_globals["language"] == "es") { $tinymce_language = "es"; } elseif ($net2ftp_globals["language"] == "fr") { $tinymce_language = "fr"; } elseif ($net2ftp_globals["language"] == "it") { $tinymce_language = "it"; } elseif ($net2ftp_globals["language"] == "ja") { $tinymce_language = "ja_euc-jp"; } elseif ($net2ftp_globals["language"] == "nl") { $tinymce_language = "nl"; } elseif ($net2ftp_globals["language"] == "pl") { $tinymce_language = "pl"; } elseif ($net2ftp_globals["language"] == "pt") { $tinymce_language = "pt_br"; } elseif ($net2ftp_globals["language"] == "ru") { $tinymce_language = "ru_UTF-8"; } elseif ($net2ftp_globals["language"] == "tc") { $tinymce_language = "zh_tw"; } elseif ($net2ftp_globals["language"] == "vi") { $tinymce_language = "vi"; } elseif ($net2ftp_globals["language"] == "zh") { $tinymce_language = "zh_cn_utf8"; } else { $tinymce_language = "en"; }
$pluginProperties["tinymce"]["use"] = "yes"; $pluginProperties["tinymce"]["label"] = "TinyMCE"; $pluginProperties["tinymce"]["directory"] = "tinymce"; $pluginProperties["tinymce"]["type"] = "textarea"; $pluginProperties["tinymce"]["browsers"][1] = "IE"; $pluginProperties["tinymce"]["browsers"][2] = "Mozilla"; $pluginProperties["tinymce"]["browsers"][3] = "Opera"; $pluginProperties["tinymce"]["browsers"][4] = "Other"; $pluginProperties["tinymce"]["filename_extensions"][1] = "html"; $pluginProperties["tinymce"]["includePhpFiles"][1] = ""; $pluginProperties["tinymce"]["printJavascript"] = "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/tinymce/tiny_mce.js\"></script>\n"; $pluginProperties["tinymce"]["printJavascript"] .= "<script type=\"text/javascript\">\n"; $pluginProperties["tinymce"]["printJavascript"] .= " tinyMCE.init({\n"; $pluginProperties["tinymce"]["printJavascript"] .= " mode : \"exact\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " elements : \"text_splitted[middle]\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme : \"advanced\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " plugins : \"table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " language : \"$tinymce_language\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_buttons1_add_before : \"save,separator\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_buttons1_add : \"fontselect,fontsizeselect\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_buttons2_add : \"separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_buttons2_add_before: \"cut,copy,paste,separator,search,replace,separator\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_buttons3_add_before : \"tablecontrols,separator\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_buttons3_add : \"emotions,iespell,flash,advhr,separator,print\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_toolbar_location : \"top\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_toolbar_align : \"left\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " theme_advanced_path_location : \"bottom\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " content_css : \"example_full.css\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " plugin_insertdate_dateFormat : \"%Y-%m-%d\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " plugin_insertdate_timeFormat : \"%H:%M:%S\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " extended_valid_elements : \"a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " external_link_list_url : \"example_link_list.js\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " external_image_list_url : \"example_image_list.js\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " flash_external_list_url : \"example_flash_list.js\",\n"; $pluginProperties["tinymce"]["printJavascript"] .= " file_browser_callback : \"fileBrowserCallBack\"\n"; $pluginProperties["tinymce"]["printJavascript"] .= " });\n\n"; $pluginProperties["tinymce"]["printJavascript"] .= " function fileBrowserCallBack(field_name, url, type) {\n"; $pluginProperties["tinymce"]["printJavascript"] .= " // This is where you insert your custom filebrowser logic\n"; $pluginProperties["tinymce"]["printJavascript"] .= " alert(\"Filebrowser callback: \" + field_name + \",\" + url + \",\" + type);\n"; $pluginProperties["tinymce"]["printJavascript"] .= " }\n\n"; $pluginProperties["tinymce"]["printJavascript"] .= "</script>\n"; $pluginProperties["tinymce"]["printCss"] = ""; $pluginProperties["tinymce"]["printBodyOnload"] = "";
// ------------------------------------------------------------------------- // Helene 0.5 SVN revision 190 - http://helene.muze.nl // A syntax highlighting text editor in javascript // -------------------------------------------------------------------------
$pluginProperties["helene"]["use"] = "no"; $pluginProperties["helene"]["label"] = "Helene"; $pluginProperties["helene"]["directory"] = "helene"; $pluginProperties["helene"]["type"] = "textarea"; $pluginProperties["helene"]["browsers"][1] = "IE"; $pluginProperties["helene"]["browsers"][2] = "Opera"; $pluginProperties["helene"]["browsers"][3] = "Mozilla"; $pluginProperties["helene"]["browsers"][4] = "Other"; $pluginProperties["helene"]["filename_extensions"][1] = "php"; $pluginProperties["helene"]["filename_extensions"][2] = "phps"; $pluginProperties["helene"]["includePhpFiles"][1] = ""; $pluginProperties["helene"]["printJavascript"] = ""; $pluginProperties["helene"]["printCss"] = ""; $pluginProperties["helene"]["printBodyOnload"] = "init();";
// ------------------------------------------------------------------------- // Version Checker - written by Slynderdale for net2ftp. // This small Javascript function will check if a new version of net2ftp is available // and display a message if there is. // -------------------------------------------------------------------------
$pluginProperties["versioncheck"]["use"] = "yes"; $pluginProperties["versioncheck"]["label"] = "Javascript Version Checker"; $pluginProperties["versioncheck"]["directory"] = "versioncheck"; $pluginProperties["versioncheck"]["type"] = "versioncheck"; $pluginProperties["versioncheck"]["browsers"][1] = "IE"; $pluginProperties["versioncheck"]["browsers"][2] = "Opera"; $pluginProperties["versioncheck"]["browsers"][3] = "Mozilla"; $pluginProperties["versioncheck"]["browsers"][4] = "Other"; $pluginProperties["versioncheck"]["filename_extensions"][1] = ""; $pluginProperties["versioncheck"]["includePhpFiles"][1] = ""; $pluginProperties["versioncheck"]["printJavascript"] = "<script type=\"text/javascript\" src=\"http://www.net2ftp.com/version.js\"></script>\n"; $pluginProperties["versioncheck"]["printCss"] = ""; $pluginProperties["versioncheck"]["printBodyOnload"] = "";
// ------------------------------------------------------------------------- // The JS Calendar code is written by Mishoo (who also wrote the HTMLArea v3). // http://dynarch.com/mishoo/calendar.epl // -------------------------------------------------------------------------
// Language code (see /plugins/jscalendar/lang) if ($net2ftp_globals["language"] == "cs") { $jscalendar_language = "calendar-cs-win"; } elseif ($net2ftp_globals["language"] == "de") { $jscalendar_language = "calendar-de"; } elseif ($net2ftp_globals["language"] == "es") { $jscalendar_language = "calendar-es"; } elseif ($net2ftp_globals["language"] == "fr") { $jscalendar_language = "calendar-fr"; } elseif ($net2ftp_globals["language"] == "it") { $jscalendar_language = "calendar-it"; } elseif ($net2ftp_globals["language"] == "nl") { $jscalendar_language = "calendar-nl"; } elseif ($net2ftp_globals["language"] == "pl") { $jscalendar_language = "calendar-pl"; } elseif ($net2ftp_globals["language"] == "ru") { $jscalendar_language = "calendar-ru"; } elseif ($net2ftp_globals["language"] == "tc") { $jscalendar_language = "calendar-big5.js"; } elseif ($net2ftp_globals["language"] == "zh") { $jscalendar_language = "calendar-zh"; } else { $jscalendar_language = "calendar-en"; }
$pluginProperties["jscalendar"]["use"] = "yes"; $pluginProperties["jscalendar"]["label"] = "JS Calendar"; $pluginProperties["jscalendar"]["directory"] = "jscalendar"; $pluginProperties["jscalendar"]["type"] = "calendar"; $pluginProperties["jscalendar"]["browsers"][1] = "IE"; $pluginProperties["jscalendar"]["browsers"][2] = "Opera"; $pluginProperties["jscalendar"]["browsers"][3] = "Mozilla"; $pluginProperties["jscalendar"]["browsers"][4] = "Other"; $pluginProperties["jscalendar"]["filename_extensions"][1] = ""; $pluginProperties["jscalendar"]["includePhpFiles"][1] = "jscalendar/calendar.php"; $pluginProperties["jscalendar"]["printJavascript"] = "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/calendar.js\"></script>\n"; $pluginProperties["jscalendar"]["printJavascript"] .= "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/lang/" . $jscalendar_language . ".js\"></script>\n"; $pluginProperties["jscalendar"]["printJavascript"] .= "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/calendar-setup.js\"></script>\n"; $pluginProperties["jscalendar"]["printCss"] = "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/skins/aqua/theme.css\" title=\"Aqua\" />\n"; $pluginProperties["jscalendar"]["printCss"] .= "<link rel=\"alternate stylesheet\" type=\"text/css\" media=\"all\" href=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/calendar-win2k-cold-1.css\" title=\"win2k-cold-1\" />\n"; $pluginProperties["jscalendar"]["printBodyOnload"] = "";
// ------------------------------------------------------------------------- // JUpload // A Java applet to upload directories and files // -------------------------------------------------------------------------
$pluginProperties["jupload"]["use"] = "yes"; $pluginProperties["jupload"]["label"] = "JUpload"; $pluginProperties["jupload"]["directory"] = "jupload"; $pluginProperties["jupload"]["type"] = "applet"; $pluginProperties["jupload"]["browsers"][1] = "IE"; $pluginProperties["jupload"]["browsers"][2] = "Opera"; $pluginProperties["jupload"]["browsers"][3] = "Mozilla"; // $pluginProperties["jupload"]["browsers"][4] = "Other"; $pluginProperties["jupload"]["filename_extensions"][1] = ""; $pluginProperties["jupload"]["includePhpFiles"][1] = ""; $pluginProperties["jupload"]["printCss"] = ""; $pluginProperties["jupload"]["printJavascript"] = ""; $pluginProperties["jupload"]["printBodyOnload"] = "";
// ------------------------------------------------------------------------- // GeSHi // Syntax highlighter // -------------------------------------------------------------------------
$pluginProperties["geshi"]["use"] = "yes"; $pluginProperties["geshi"]["label"] = "GeSHi"; $pluginProperties["geshi"]["directory"] = "geshi"; $pluginProperties["geshi"]["type"] = "highlighter"; $pluginProperties["geshi"]["browsers"][1] = "IE"; $pluginProperties["geshi"]["browsers"][2] = "Opera"; $pluginProperties["geshi"]["browsers"][3] = "Mozilla"; $pluginProperties["geshi"]["browsers"][4] = "Other"; $pluginProperties["geshi"]["filename_extensions"][1] = ""; $pluginProperties["geshi"]["includePhpFiles"][1] = "geshi/geshi.php"; $pluginProperties["geshi"]["printCss"] = ""; $pluginProperties["geshi"]["printJavascript"] = ""; $pluginProperties["geshi"]["printBodyOnload"] = "";
return $pluginProperties;
} // end function getPluginProperties
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function net2ftp_plugin_includePhpFiles() {
// -------------- // This function includes PHP files which are required by the active plugins // The list of current active plugins is stored in $net2ftp_globals["activePlugins"] // --------------
// ------------------------------------------------------------------------- // Global variables and settings // ------------------------------------------------------------------------- global $net2ftp_globals; $pluginProperties = getPluginProperties();
// ------------------------------------------------------------------------- // Initial checks and initialization // ------------------------------------------------------------------------- if ($net2ftp_globals["activePlugins"] == "") { return ""; }
// ------------------------------------------------------------------------- // For all plugins... // ------------------------------------------------------------------------- for ($pluginnr=0; $pluginnr<sizeof($net2ftp_globals["activePlugins"]); $pluginnr++) {
// Get the plugin related data $currentPlugin = $pluginProperties[$net2ftp_globals["activePlugins"][$pluginnr]];
// Check if the plugin should be used if ($currentPlugin["use"] != "yes" || $currentPlugin["includePhpFiles"][1] == "") { continue; }
// ------------------------------------------------------------------------- // Include PHP files // ------------------------------------------------------------------------- for ($i=1; $i<=sizeof($currentPlugin["includePhpFiles"]); $i++) { require_once($net2ftp_globals["application_pluginsdir"] . "/" . $currentPlugin["includePhpFiles"][$i]); } // end for
} // end for
} // End function net2ftp_plugin_includePhpFiles
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function net2ftp_plugin_printJavascript() {
// -------------- // This function includes PHP files which are required by the active plugins // The list of current active plugins is stored in $net2ftp_globals["activePlugins"] // --------------
// ------------------------------------------------------------------------- // Global variables and settings // ------------------------------------------------------------------------- global $net2ftp_globals; $pluginProperties = getPluginProperties();
// ------------------------------------------------------------------------- // Initial checks and initialization // ------------------------------------------------------------------------- if ($net2ftp_globals["activePlugins"] == "") { return ""; }
// ------------------------------------------------------------------------- // For all plugins... // ------------------------------------------------------------------------- for ($pluginnr=0; $pluginnr<sizeof($net2ftp_globals["activePlugins"]); $pluginnr++) {
// Get the plugin related data $currentPlugin = $pluginProperties[$net2ftp_globals["activePlugins"][$pluginnr]];
// Check if the plugin should be used if ($currentPlugin["use"] != "yes") { continue; }
// ------------------------------------------------------------------------- // Print Javascript code // ------------------------------------------------------------------------- echo $currentPlugin["printJavascript"];
} // end for
} // End function net2ftp_plugin_printJavascript
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function net2ftp_plugin_printCss() {
// -------------- // This function includes PHP files which are required by the active plugins // The list of current active plugins is stored in $net2ftp_globals["activePlugins"] // --------------
// ------------------------------------------------------------------------- // Global variables and settings // ------------------------------------------------------------------------- global $net2ftp_globals; $pluginProperties = getPluginProperties();
// ------------------------------------------------------------------------- // Initial checks and initialization // ------------------------------------------------------------------------- if ($net2ftp_globals["activePlugins"] == "") { return ""; }
// ------------------------------------------------------------------------- // For all plugins... // ------------------------------------------------------------------------- for ($pluginnr=0; $pluginnr<sizeof($net2ftp_globals["activePlugins"]); $pluginnr++) {
// Get the plugin related data $currentPlugin = $pluginProperties[$net2ftp_globals["activePlugins"][$pluginnr]];
// Check if the plugin should be used if ($currentPlugin["use"] != "yes") { continue; }
// ------------------------------------------------------------------------- // Print CSS code // ------------------------------------------------------------------------- echo $currentPlugin["printCss"];
} // end for
} // End function net2ftp_plugin_printCss
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
// ************************************************************************************** // ************************************************************************************** // ** ** // ** **
function net2ftp_plugin_printBodyOnload() {
// -------------- // This function includes PHP files which are required by the active plugins // The list of current active plugins is stored in $net2ftp_globals["activePlugins"] // --------------
// ------------------------------------------------------------------------- // Global variables and settings // ------------------------------------------------------------------------- global $net2ftp_globals; $pluginProperties = getPluginProperties();
// ------------------------------------------------------------------------- // Initial checks and initialization // ------------------------------------------------------------------------- if ($net2ftp_globals["activePlugins"] == "") { return ""; }
// ------------------------------------------------------------------------- // For all plugins... // ------------------------------------------------------------------------- for ($pluginnr=0; $pluginnr<sizeof($net2ftp_globals["activePlugins"]); $pluginnr++) {
// Get the plugin related data $currentPlugin = $pluginProperties[$net2ftp_globals["activePlugins"][$pluginnr]];
// Check if the plugin should be used if ($currentPlugin["use"] != "yes") { continue; }
// ------------------------------------------------------------------------- // Print <body onload=""> code // ------------------------------------------------------------------------- echo $currentPlugin["printBodyOnload"];
} // end for
} // End function net2ftp_plugin_printBodyOnload
// ** ** // ** ** // ************************************************************************************** // **************************************************************************************
?>
|