aboutsummaryrefslogtreecommitdiffstats
path: root/BSF/plugins
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2008-05-23 21:05:41 +0000
committervdigital <vdigital@piwigo.org>2008-05-23 21:05:41 +0000
commit77fd1f51a3c5f5a52f72ef8a299fe368228e2285 (patch)
treea67ede42904657ccf3349ecdaef1cec8b8e36ff8 /BSF/plugins
parent553727dffacc48e8337c1d141f2a25af359e74b1 (diff)
git-svn-id: http://piwigo.org/svn/trunk@2357 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--BSF/plugins/LocalFilesEditor/admin.php304
-rw-r--r--BSF/plugins/LocalFilesEditor/admin.tpl49
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js38
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/close.gifbin0 -> 102 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gifbin0 -> 198 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gifbin0 -> 1053 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/help.gifbin0 -> 295 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/highlight.gifbin0 -> 256 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/load.gifbin0 -> 1041 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/move.gifbin0 -> 257 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gifbin0 -> 170 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/opacity.pngbin0 -> 147 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/processing.gifbin0 -> 825 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/redo.gifbin0 -> 169 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gifbin0 -> 168 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/save.gifbin0 -> 285 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/search.gifbin0 -> 191 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gifbin0 -> 174 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/spacer.gifbin0 -> 43 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gifbin0 -> 79 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/undo.gifbin0 -> 175 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/cs.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/de.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/dk.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/en.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/es.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/fr.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/hr.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/it.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/ja.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/mk.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/nl.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/pl.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/pt.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/ru.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/sk.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js84
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js50
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js60
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js75
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js55
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js56
-rw-r--r--BSF/plugins/LocalFilesEditor/functions.inc.php70
-rw-r--r--BSF/plugins/LocalFilesEditor/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/en_UK/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php45
-rw-r--r--BSF/plugins/LocalFilesEditor/language/es_ES/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php45
-rw-r--r--BSF/plugins/LocalFilesEditor/language/fr_FR/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php45
-rw-r--r--BSF/plugins/LocalFilesEditor/language/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/main.inc.php46
-rw-r--r--BSF/plugins/LocalFilesEditor/show_default.php68
-rw-r--r--BSF/plugins/LocalFilesEditor/show_default.tpl13
-rw-r--r--BSF/plugins/add_index/admin/index.php30
-rw-r--r--BSF/plugins/add_index/admin/main_page.php205
-rw-r--r--BSF/plugins/add_index/admin/main_page.tpl15
-rw-r--r--BSF/plugins/add_index/index.php30
-rw-r--r--BSF/plugins/add_index/language/en_UK/help/advanced_feature.html7
-rw-r--r--BSF/plugins/add_index/language/en_UK/help/index.php30
-rw-r--r--BSF/plugins/add_index/language/en_UK/help/site_manager.html7
-rw-r--r--BSF/plugins/add_index/language/en_UK/index.php30
-rw-r--r--BSF/plugins/add_index/language/en_UK/plugin.lang.php39
-rw-r--r--BSF/plugins/add_index/language/es_ES/help/advanced_feature.html7
-rw-r--r--BSF/plugins/add_index/language/es_ES/help/index.php30
-rw-r--r--BSF/plugins/add_index/language/es_ES/help/site_manager.html7
-rw-r--r--BSF/plugins/add_index/language/es_ES/index.php30
-rw-r--r--BSF/plugins/add_index/language/es_ES/plugin.lang.php39
-rw-r--r--BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html7
-rw-r--r--BSF/plugins/add_index/language/fr_FR/help/index.php30
-rw-r--r--BSF/plugins/add_index/language/fr_FR/help/site_manager.html7
-rw-r--r--BSF/plugins/add_index/language/fr_FR/index.php30
-rw-r--r--BSF/plugins/add_index/language/fr_FR/plugin.lang.php39
-rw-r--r--BSF/plugins/add_index/language/index.php30
-rw-r--r--BSF/plugins/add_index/main.admin.inc.php93
-rw-r--r--BSF/plugins/add_index/main.base.inc.php39
-rw-r--r--BSF/plugins/add_index/main.inc.php53
-rw-r--r--BSF/plugins/add_index/main.normal.inc.php60
-rw-r--r--BSF/plugins/admin_advices/admin_advices.tpl39
-rw-r--r--BSF/plugins/admin_advices/default-layout.css19
-rw-r--r--BSF/plugins/admin_advices/en_UK/index.php30
-rw-r--r--BSF/plugins/admin_advices/en_UK/lang.adv.php447
-rw-r--r--BSF/plugins/admin_advices/fr_FR/index.php30
-rw-r--r--BSF/plugins/admin_advices/fr_FR/lang.adv.php480
-rw-r--r--BSF/plugins/admin_advices/index.php30
-rw-r--r--BSF/plugins/admin_advices/main.inc.php127
-rw-r--r--BSF/plugins/admin_multi_view/controller.php221
-rw-r--r--BSF/plugins/admin_multi_view/index.php30
-rw-r--r--BSF/plugins/admin_multi_view/is_admin.inc.php47
-rw-r--r--BSF/plugins/admin_multi_view/main.inc.php42
-rw-r--r--BSF/plugins/c13y_upgrade/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/initialize.inc.php142
-rw-r--r--BSF/plugins/c13y_upgrade/language/en_UK/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php32
-rw-r--r--BSF/plugins/c13y_upgrade/language/es_ES/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php32
-rw-r--r--BSF/plugins/c13y_upgrade/language/fr_FR/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php32
-rw-r--r--BSF/plugins/c13y_upgrade/language/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/main.inc.php46
-rw-r--r--BSF/plugins/event_tracer/event_list.php90
-rw-r--r--BSF/plugins/event_tracer/event_list.tpl17
-rw-r--r--BSF/plugins/event_tracer/index.php30
-rw-r--r--BSF/plugins/event_tracer/main.inc.php137
-rw-r--r--BSF/plugins/event_tracer/maintain.inc.php9
-rw-r--r--BSF/plugins/event_tracer/tracer_admin.php31
-rw-r--r--BSF/plugins/event_tracer/tracer_admin.tpl29
-rw-r--r--BSF/plugins/extended_description/index.php30
-rw-r--r--BSF/plugins/extended_description/main.inc.php69
-rw-r--r--BSF/plugins/hello_world/index.php30
-rw-r--r--BSF/plugins/hello_world/main.inc.php56
-rw-r--r--BSF/plugins/index.php30
-rw-r--r--BSF/plugins/language_switch/icons/cz_CZ.gifbin0 -> 903 bytes
-rw-r--r--BSF/plugins/language_switch/icons/de_DE.gifbin0 -> 899 bytes
-rw-r--r--BSF/plugins/language_switch/icons/en_UK.gifbin0 -> 1161 bytes
-rw-r--r--BSF/plugins/language_switch/icons/es_AR.gifbin0 -> 1166 bytes
-rw-r--r--BSF/plugins/language_switch/icons/es_ES.gifbin0 -> 1025 bytes
-rw-r--r--BSF/plugins/language_switch/icons/fr_FR.gifbin0 -> 236 bytes
-rw-r--r--BSF/plugins/language_switch/icons/hu_HU.gifbin0 -> 1033 bytes
-rw-r--r--BSF/plugins/language_switch/icons/index.php30
-rw-r--r--BSF/plugins/language_switch/icons/it_IT.gifbin0 -> 959 bytes
-rw-r--r--BSF/plugins/language_switch/icons/nl_NL.gifbin0 -> 103 bytes
-rw-r--r--BSF/plugins/language_switch/icons/pl_PL.gifbin0 -> 156 bytes
-rw-r--r--BSF/plugins/language_switch/index.php30
-rw-r--r--BSF/plugins/language_switch/language_switch.inc.php92
-rw-r--r--BSF/plugins/language_switch/main.inc.php36
130 files changed, 5904 insertions, 0 deletions
diff --git a/BSF/plugins/LocalFilesEditor/admin.php b/BSF/plugins/LocalFilesEditor/admin.php
new file mode 100644
index 000000000..209855904
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/admin.php
@@ -0,0 +1,304 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
+include_once(LOCALEDIT_PATH.'functions.inc.php');
+load_language('plugin.lang', LOCALEDIT_PATH);
+$my_base_url = get_admin_plugin_menu_link(__FILE__);
+
+// +-----------------------------------------------------------------------+
+// | Tabssheet
+// +-----------------------------------------------------------------------+
+if (!isset($_GET['tab']))
+ $page['tab'] = 'localconf';
+else
+ $page['tab'] = $_GET['tab'];
+
+$tabsheet = new tabsheet();
+$tabsheet->add('localconf',
+ l10n('locfiledit_onglet_localconf'),
+ $my_base_url.'&amp;tab=localconf');
+$tabsheet->add('css',
+ l10n('locfiledit_onglet_css'),
+ $my_base_url.'&amp;tab=css');
+$tabsheet->add('tpl',
+ l10n('locfiledit_onglet_tpl'),
+ $my_base_url.'&amp;tab=tpl');
+$tabsheet->add('lang',
+ l10n('locfiledit_onglet_lang'),
+ $my_base_url.'&amp;tab=lang');
+$tabsheet->add('plug',
+ l10n('locfiledit_onglet_plug'),
+ $my_base_url.'&amp;tab=plug');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+
+// +-----------------------------------------------------------------------+
+// | Variables init
+// +-----------------------------------------------------------------------+
+$edited_file = '';
+$content_file = '';
+$new_file['localconf'] = "<?php\n\n".l10n('locfiledit_newfile')."\n\n\n\n\n?>";
+$new_file['css'] = l10n('locfiledit_newfile') . "\n\n";
+$new_file['lang'] = "<?php\n\n" . l10n('locfiledit_newfile') . "\n\n\n\n\n?>";
+$new_file['plug'] = "<?php\n/*
+Plugin Name: " . l10n('locfiledit_onglet_plug') . "
+Version: 1.0
+Description: " . l10n('locfiledit_onglet_plug') . "
+Plugin URI: http://www.phpwebgallery.net
+Author:
+Author URI:
+*/\n\n\n\n\n?>";
+
+// Editarea options
+$editarea = array(
+ 'start_highlight' => true,
+ 'language' => substr($user['language'], 0, 2),
+ 'toolbar' => 'search,fullscreen, |,select_font, |, undo, redo, change_smooth_selection, highlight, reset_highlight, |, help');
+if (isset($conf['editarea_options']) and is_array($conf['editarea_options']))
+{
+ $editarea = array_merge($editarea, $conf['editarea_options']);
+}
+
+// Edit selected file for CSS, template and language
+if ((isset($_POST['edit'])) and !is_numeric($_POST['file_to_edit']))
+{
+ $edited_file = $_POST['file_to_edit'];
+ $content_file = file_exists($edited_file) ?
+ file_get_contents($edited_file) : $new_file[$page['tab']];
+}
+
+
+// +-----------------------------------------------------------------------+
+// | Process tabsheet
+// +-----------------------------------------------------------------------+
+$options[] = l10n('locfiledit_choose_file');
+$selected = 0;
+
+switch ($page['tab'])
+{
+ case 'localconf':
+ $edited_file = PHPWG_ROOT_PATH . "include/config_local.inc.php";
+ $content_file = file_exists($edited_file) ?
+ file_get_contents($edited_file) : $new_file['localconf'];
+
+ $template->assign('show_default' , array(
+ array('SHOW_DEFAULT' => LOCALEDIT_PATH
+ . 'show_default.php?file=include/config_default.inc.php',
+ 'FILE' => 'config_default.inc.php')));
+ $editarea['syntax'] = 'php';
+ break;
+
+ case 'css':
+ $template_dir = PHPWG_ROOT_PATH . 'template';
+ $options[] = '----------------------';
+ $value = PHPWG_ROOT_PATH . "template-common/local-layout.css";
+ $options[$value] = 'template-common / local-layout.css';
+ if ($edited_file == $value) $selected = $value;
+
+ foreach (get_dirs($template_dir) as $pwg_template)
+ {
+ $options[] = '----------------------';
+ $value = $template_dir . '/' . $pwg_template . '/local-layout.css';
+ $options[$value] = $pwg_template . ' / local-layout.css';
+ if ($edited_file == $value) $selected = $value;
+ $options[] = '----------------------';
+ foreach (get_dirs($template_dir.'/'.$pwg_template.'/theme') as $theme)
+ {
+ $value = $template_dir.'/'.$pwg_template.'/theme/'.$theme.'/theme.css';
+ $options[$value] = $pwg_template . ' / ' . $theme . ' / theme.css';
+ if ($edited_file == $value) $selected = $value;
+ }
+ }
+ $template->assign('css_lang_tpl', array(
+ 'OPTIONS' => $options,
+ 'SELECTED' => $selected));
+ $editarea['syntax'] = 'css';
+ break;
+
+ case 'tpl':
+ $template_dir = PHPWG_ROOT_PATH . 'template';
+ foreach (get_dirs($template_dir) as $pwg_template)
+ {
+ $dir = $template_dir . '/' . $pwg_template . '/';
+ $options[] = '----------------------';
+ if (is_dir($dir) and $content = opendir($dir))
+ {
+ while ($node = readdir($content))
+ {
+ if (is_file($dir . $node)
+ and strtolower(get_extension($node)) == 'tpl'
+ and !strpos($node , '.bak.tpl'))
+ {
+ $value = $dir . $node;
+ $options[$value] = $pwg_template . ' / ' . $node;
+ if ($edited_file == $value) $selected = $value;
+ }
+ }
+ }
+ }
+ $template->assign('css_lang_tpl', array(
+ 'OPTIONS' => $options,
+ 'SELECTED' => $selected));
+ $editarea['syntax'] = 'html';
+ break;
+
+ case 'lang':
+ $options[] = '----------------------';
+ foreach (get_languages() as $language_code => $language_name)
+ {
+ $value = PHPWG_ROOT_PATH.'language/'.$language_code.'/local.lang.php';
+ if ($edited_file == $value)
+ {
+ $selected = $value;
+ $template->assign('show_default', array(
+ array('SHOW_DEFAULT' => LOCALEDIT_PATH
+ . 'show_default.php?file='
+ . 'language/'.$language_code.'/common.lang.php',
+ 'FILE' => 'common.lang.php'),
+ array('SHOW_DEFAULT' => LOCALEDIT_PATH
+ . 'show_default.php?file='
+ . 'language/'.$language_code.'/admin.lang.php',
+ 'FILE' => 'admin.lang.php')));
+ }
+ $options[$value] = $language_name;
+ }
+ $template->assign('css_lang_tpl', array(
+ 'OPTIONS' => $options,
+ 'SELECTED' => $selected));
+ $editarea['syntax'] = 'php';
+ break;
+
+ case 'plug':
+ $edited_file = PHPWG_PLUGINS_PATH . "PersonalPlugin/main.inc.php";
+ $content_file = file_exists($edited_file) ?
+ file_get_contents($edited_file) : $new_file['plug'];
+ $editarea['syntax'] = 'php';
+ break;
+}
+
+
+// +-----------------------------------------------------------------------+
+// | Load backup file
+// +-----------------------------------------------------------------------+
+if (isset($_POST['restore']) and !is_adviser())
+{
+ $edited_file = $_POST['edited_file'];
+ $content_file = file_get_contents(
+ substr_replace($edited_file , '.bak' , strrpos($edited_file ,'.') , 0));
+
+ array_push($page['infos'],
+ l10n('locfiledit_bak_loaded1'),
+ l10n('locfiledit_bak_loaded2'));
+}
+
+
+// +-----------------------------------------------------------------------+
+// | Save file
+// +-----------------------------------------------------------------------+
+if (isset($_POST['submit']) and !is_adviser())
+{
+ $edited_file = $_POST['edited_file'];
+ $content_file = stripslashes($_POST['text']);
+ if (get_extension($edited_file) == 'php')
+ {
+ $content_file = eval_syntax($content_file);
+ }
+ if ($content_file === false)
+ {
+ array_push($page['errors'], l10n('locfiledit_syntax_error'));
+ }
+ else
+ {
+ if ($page['tab'] == 'plug'
+ and !is_dir(PHPWG_PLUGINS_PATH . 'PersonalPlugin'))
+ {
+ @mkdir(PHPWG_PLUGINS_PATH . "PersonalPlugin");
+ }
+ if (file_exists($edited_file))
+ {
+ @copy($edited_file,
+ substr_replace($edited_file,
+ '.bak',
+ strrpos($edited_file , '.'),
+ 0)
+ );
+ }
+
+ if ($file = @fopen($edited_file , "w"))
+ {
+ @fwrite($file , $content_file);
+ @fclose($file);
+ array_push($page['infos'],
+ l10n('locfiledit_save_config'),
+ sprintf(l10n('locfiledit_saved_bak'),
+ substr(substr_replace($edited_file,
+ '.bak',
+ strrpos($edited_file , '.'),
+ 0),
+ 2)));
+ }
+ else
+ {
+ array_push($page['errors'], l10n('locfiledit_cant_save'));
+ }
+ }
+}
+
+
+// +-----------------------------------------------------------------------+
+// | template initialization
+// +-----------------------------------------------------------------------+
+$template->set_filenames(array(
+ 'plugin_admin_content' => dirname(__FILE__) . '/admin.tpl'));
+
+if (!empty($edited_file))
+{
+ if (!empty($page['errors']))
+ {
+ $content_file = stripslashes($_POST['text']);
+ }
+ $template->assign('zone_edit',
+ array('EDITED_FILE' => $edited_file,
+ 'CONTENT_FILE' => htmlspecialchars($content_file),
+ 'FILE_NAME' => trim($edited_file, './\\')));
+ if (file_exists(
+ substr_replace($edited_file ,'.bak',strrpos($edited_file , '.'),0)))
+ {
+ $template->assign('restore', true);
+ }
+}
+
+// Editarea
+if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false)
+{
+ $template->assign('editarea', array(
+ 'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js',
+ 'OPTIONS' => $editarea));
+}
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/admin.tpl b/BSF/plugins/LocalFilesEditor/admin.tpl
new file mode 100644
index 000000000..f1306080e
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/admin.tpl
@@ -0,0 +1,49 @@
+{if isset($editarea)}
+<script type="text/javascript" src="{$editarea.URL}"></script>
+<script type="text/javascript">
+editAreaLoader.init({ldelim}
+ id: "text"
+ {foreach from=$editarea.OPTIONS key=option item=value}
+ , {$option}: {$value|editarea_quote}
+ {/foreach}
+{rdelim});
+</script>
+{/if}
+
+<div class="titrePage">
+ <h2>LocalFiles Editor</h2>
+ {$TABSHEET}
+</div>
+
+<form method="post" class="properties" action="" ENCTYPE="multipart/form-data">
+<div style="text-align:center;">
+
+{if isset ($css_lang_tpl)}
+{html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED}
+<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" />
+<br>
+<br>
+{/if}
+
+{foreach from=$show_default item=file}
+<a href="{$file.SHOW_DEFAULT}" onclick="window.open( this.href, 'local_file', 'location=no,toolbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,width=800,height=600' ); return false;">{'locfiledit_show_default'|@translate} "{$file.FILE}"</a>
+<br>
+{/foreach}
+
+{if isset ($zone_edit)}
+<br>
+<input type="text" style="display:none;" value="{$zone_edit.EDITED_FILE}" name="edited_file"/>
+<b>{$zone_edit.FILE_NAME}</b>
+<br>
+<textarea rows="30" name="text" id="text" style="width:90%;">{$zone_edit.CONTENT_FILE}</textarea>
+<br>{'locfiledit_save_bak'|@translate}
+<br><br>
+<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
+{if isset ($restore)}
+<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');" {$TAG_INPUT_ENABLED}/>
+{/if}
+{/if}
+
+<br>
+</div>
+</form>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js b/BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js
new file mode 100644
index 000000000..7cb34270d
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js
@@ -0,0 +1,38 @@
+ function EAL(){this.version="0.7.1";date=new Date();this.start_time=date.getTime();this.win="loading";this.error=false;this.baseURL="";this.template="";this.lang=new Object();this.load_syntax=new Object();this.syntax=new Object();this.loadedFiles=new Array();this.waiting_loading=new Object();this.scripts_to_load=new Array();this.sub_scripts_to_load=new Array();this.resize=new Array();this.hidden=new Object();this.default_settings={debug: false ,smooth_selection: true ,font_size: "10" ,font_family: "monospace" ,start_highlight: false ,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help" ,begin_toolbar: "" ,end_toolbar: "" ,is_multi_files: false ,allow_resize: "both" ,min_width: 400 ,min_height: 125 ,replace_tab_by_spaces: false ,allow_toggle: true ,language: "en" ,syntax: "" ,syntax_selection_allow: "basic,brainfuck,c,cpp,css,html,js,pas,php,python,ruby,sql,vb,xml" ,display: "onload" ,max_undo: 30 ,browsers: "known" ,plugins: "" ,gecko_spellcheck: false ,fullscreen: false ,is_editable: true ,load_callback: "" ,save_callback: "" ,change_callback: "" ,submit_callback: "" ,EA_init_callback: "" ,EA_delete_callback: "" ,EA_load_callback: "" ,EA_unload_callback: "" ,EA_toggle_on_callback: "" ,EA_toggle_off_callback: "" ,EA_file_switch_on_callback: "" ,EA_file_switch_off_callback: "" ,EA_file_close_callback: "" };this.advanced_buttons=[ ['new_document', 'newdocument.gif', 'new_document', false], ['search', 'search.gif', 'show_search', false], ['go_to_line', 'go_to_line.gif', 'go_to_line', false], ['undo', 'undo.gif', 'undo', true], ['redo', 'redo.gif', 'redo', true], ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true], ['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true], ['highlight', 'highlight.gif','change_highlight', true], ['help', 'help.gif', 'show_help', false], ['save', 'save.gif', 'save', false], ['load', 'load.gif', 'load', false], ['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false] ];ua=navigator.userAgent;this.nav=new Object();this.nav['isMacOS']=(ua.indexOf('Mac OS') !=-1);this.nav['isIE']=(navigator.appName=="Microsoft Internet Explorer");if(this.nav['isIE']){this.nav['isIE']=ua.replace(/^.*?MSIE ([0-9\.]*).*$/, "$1");if(this.nav['isIE']<6) this.has_error();}if(this.nav['isNS']=ua.indexOf('Netscape/') !=-1){this.nav['isNS']=ua.substr(ua.indexOf('Netscape/')+9);if(this.nav['isNS']<8 || !this.nav['isIE']) this.has_error();}if(this.nav['isOpera']=(ua.indexOf('Opera') !=-1)){this.nav['isOpera']=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");if(this.nav['isOpera']<9) this.has_error();this.nav['isIE']=false;}this.nav['isGecko']=(ua.indexOf('Gecko') !=-1);if(this.nav['isFirefox'] =(ua.indexOf('Firefox') !=-1)) this.nav['isFirefox']=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");if(this.nav['isIceweasel'] =(ua.indexOf('Iceweasel') !=-1)) this.nav['isFirefox']=this.nav['isIceweasel']=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");if(this.nav['isCamino'] =(ua.indexOf('Camino') !=-1)) this.nav['isCamino']=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");if(this.nav['isSafari'] =(ua.indexOf('Safari') !=-1)) this.nav['isSafari']=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1");if(this.nav['isIE']>=6 || this.nav['isOpera']>=9 || this.nav['isFirefox'] || this.nav['isCamino'] || this.nav['isSafari']>=3) this.nav['isValidBrowser']=true;
+else this.nav['isValidBrowser']=false;this.set_base_url();for(var i=0;i<this.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+this.baseURL + this.scripts_to_load[i]+ ".js');", 1);this.waiting_loading[this.scripts_to_load[i]+ ".js"]=false;}this.add_event(window, "load", EAL.prototype.window_loaded);};EAL.prototype.has_error=function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}};EAL.prototype.window_loaded=function(){eAL.win="loaded";if (document.forms){for (var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch (e){}eAL.add_event(form, "submit", EAL.prototype.submit);eAL.add_event(form, "reset", EAL.prototype.reset);}}eAL.add_event(window, "unload", function(){for(var i in eAs){eAL.delete_instance(i);}});};EAL.prototype.init_ie_textarea=function(id){textarea=document.getElementById(id);try{if(textarea && typeof(textarea.focused)=="undefined"){textarea.focus();textarea.focused=true;textarea.selectionStart=textarea.selectionEnd=0;get_IE_selection(textarea);eAL.add_event(textarea, "focus", IE_textarea_focus);eAL.add_event(textarea, "blur", IE_textarea_blur);}}catch(ex){}};EAL.prototype.init=function(settings){if(!settings["id"]) this.has_error();if(this.error) return;if(eAs[settings["id"]]) eAL.delete_instance(settings["id"]);for(var i in this.default_settings){if(typeof(settings[i])=="undefined") settings[i]=this.default_settings[i];}if(settings["browsers"]=="known" && this.nav['isValidBrowser']==false){return;}if(settings["begin_toolbar"].length>0) settings["toolbar"]=settings["begin_toolbar"] +","+ settings["toolbar"];if(settings["end_toolbar"].length>0) settings["toolbar"]=settings["toolbar"] +","+ settings["end_toolbar"];settings["tab_toolbar"]=settings["toolbar"].replace(/ /g,"").split(",");settings["plugins"]=settings["plugins"].replace(/ /g,"").split(",");for(var i=0;i<settings["plugins"].length;i++){if(settings["plugins"][i].length==0) settings["plugins"].splice(i,1);}this.get_template();this.load_script(this.baseURL + "langs/"+ settings["language"] + ".js");if(settings["syntax"].length>0){settings["syntax"]=settings["syntax"].toLowerCase();this.load_script(this.baseURL + "reg_syntax/"+ settings["syntax"] + ".js");}eAs[settings["id"]]={"settings": settings};eAs[settings["id"]]["displayed"]=false;eAs[settings["id"]]["hidden"]=false;eAL.start(settings["id"]);};EAL.prototype.delete_instance=function(id){eAL.execCommand(id, "EA_delete");if(window.frames["frame_"+id] && window.frames["frame_"+id].editArea){if(eAs[id]["displayed"]) eAL.toggle(id, "off");window.frames["frame_"+id].editArea.execCommand("EA_unload");}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.parentNode.removeChild(span);}var iframe=document.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete window.frames["frame_"+id];}catch (e){}}delete eAs[id];};EAL.prototype.start=function(id){if(this.win!="loaded"){setTimeout("eAL.start('"+id+"');", 50);return;}for(var i in eAL.waiting_loading){if(eAL.waiting_loading[i]!="loaded" && typeof(eAL.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');", 50);return;}}if(!eAL.lang[eAs[id]["settings"]["language"]] || (eAs[id]["settings"]["syntax"].length>0 && !eAL.load_syntax[eAs[id]["settings"]["syntax"]]) ){setTimeout("eAL.start('"+id+"');", 50);return;}if(eAs[id]["settings"]["syntax"].length>0) eAL.init_syntax_regexp();if(!document.getElementById("EditAreaArroundInfos_"+id) && (eAs[id]["settings"]["debug"] || eAs[id]["settings"]["allow_toggle"])){var span=document.createElement("span");span.id="EditAreaArroundInfos_"+id;var html="";if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+ id +"' class='toggle_"+ id +"' type='checkbox' onclick='eAL.toggle(\""+ id +"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+ id +"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"]) html+="<textarea id='edit_area_debug_"+ id +"' style='z-index: 20;width: 100%;height: 120px;overflow: auto;border: solid black 1px;'></textarea><br />";html=eAL.translate(html, eAs[id]["settings"]["language"]);span.innerHTML=html;var father=document.getElementById(id).parentNode;var next=document.getElementById(id).nextSibling;if(next==null) father.appendChild(span);
+else father.insertBefore(span, next);}if(!eAs[id]["initialized"]){this.execCommand(id, "EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(this.nav['isIE']){eAL.init_ie_textarea(id);}var html_toolbar_content="";area=eAs[id];for(var i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=this.get_control_html(area["settings"]["tab_toolbar"][i], area["settings"]["language"]);}if(!this.iframe_script){this.iframe_script="";for(var i=0;i<this.sub_scripts_to_load.length;i++) this.iframe_script+='<script language="javascript" type="text/javascript" src="'+ this.baseURL + this.sub_scripts_to_load[i] +'.js"></script>';}for(var i=0;i<area["settings"]["plugins"].length;i++){if(!eAL.all_plugins_loaded) this.iframe_script+='<script language="javascript" type="text/javascript" src="'+ this.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/' + area["settings"]["plugins"][i] +'.js"></script>';this.iframe_script+='<script language="javascript" type="text/javascript" src="'+ this.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/langs/' + area["settings"]["language"] +'.js"></script>';}if(!this.iframe_css){this.iframe_css="<link href='"+ this.baseURL +"edit_area.css' rel='stylesheet' type='text/css' />";}var template=this.template.replace(/\[__BASEURL__\]/g, this.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=this.translate(template, area["settings"]["language"], "template");template=template.replace("[__CSSRULES__]", this.iframe_css);template=template.replace("[__JSCODE__]", this.iframe_script);template=template.replace("[__EA_VERSION__]", this.version);area.textarea=document.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined') delete window.frames["frame_"+area["settings"]["id"]];var father=area.textarea.parentNode;var content=document.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content, "frameBorder", "0");content.style.overflow="hidden";content.style.display="none";var next=area.textarea.nextSibling;if(next==null) father.appendChild(content);
+else father.insertBefore(content, next);var frame=window.frames["frame_"+area["settings"]["id"]];frame.document.open();frame.eAs=eAs;frame.area_id=area["settings"]["id"];frame.document.area_id=area["settings"]["id"];frame.document.write(template);frame.document.close();};EAL.prototype.toggle=function(id, toggle_to){if(!toggle_to) toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true && toggle_to=="off"){this.toggle_off(id);}
+else if(eAs[id]["displayed"]==false && toggle_to=="on"){this.toggle_on(id);}return false;};EAL.prototype.toggle_off=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];if(frame.editArea.fullscreen['isFull']) frame.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;eAs[id]["textarea"].wrap="off";setAttribute(eAs[id]["textarea"], "wrap", "off");var parNod=eAs[id]["textarea"].parentNode;var nxtSib=eAs[id]["textarea"].nextSibling;parNod.removeChild(eAs[id]["textarea"]);parNod.insertBefore(eAs[id]["textarea"], nxtSib);eAs[id]["textarea"].value=frame.editArea.textarea.value;var selStart=frame.editArea.last_selection["selectionStart"];var selEnd=frame.editArea.last_selection["selectionEnd"];var scrollTop=frame.document.getElementById("result").scrollTop;var scrollLeft=frame.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';eAs[id]["textarea"].style.display="inline";eAs[id]["textarea"].focus();if(this.nav['isIE']){eAs[id]["textarea"].selectionStart=selStart;eAs[id]["textarea"].selectionEnd=selEnd;eAs[id]["textarea"].focused=true;set_IE_selection(eAs[id]["textarea"]);}
+else{if(this.nav['isOpera']){eAs[id]["textarea"].setSelectionRange(0, 0);}try{eAs[id]["textarea"].setSelectionRange(selStart, selEnd);}catch(e){};}eAs[id]["textarea"].scrollTop=scrollTop;eAs[id]["textarea"].scrollLeft=scrollLeft;frame.editArea.execCommand("toggle_off");}};EAL.prototype.toggle_on=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];area=window.frames["frame_"+id].editArea;area.textarea.value=eAs[id]["textarea"].value;var selStart=0;var selEnd=0;var scrollTop=0;var scrollLeft=0;if(eAs[id]["textarea"].use_last==true){var selStart=eAs[id]["textarea"].last_selectionStart;var selEnd=eAs[id]["textarea"].last_selectionEnd;var scrollTop=eAs[id]["textarea"].last_scrollTop;var scrollLeft=eAs[id]["textarea"].last_scrollLeft;eAs[id]["textarea"].use_last=false;}
+else{try{var selStart=eAs[id]["textarea"].selectionStart;var selEnd=eAs[id]["textarea"].selectionEnd;var scrollTop=eAs[id]["textarea"].scrollTop;var scrollLeft=eAs[id]["textarea"].scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));eAs[id]["textarea"].style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");window.frames["frame_"+id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart, selEnd-selStart);area.execCommand("toggle_on");}
+else{var elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}};EAL.prototype.set_editarea_size_from_textarea=function(id, frame){var elem=document.getElementById(id);var width=Math.max(eAs[id]["settings"]["min_width"], elem.offsetWidth)+"px";var height=Math.max(eAs[id]["settings"]["min_height"], elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1) width=elem.style.width;if(elem.style.height.indexOf("%")!=-1) height=elem.style.height;frame.style.width=width;frame.style.height=height;};EAL.prototype.set_base_url=function(){if (!this.baseURL){var elements=document.getElementsByTagName('script');for (var i=0;i<elements.length;i++){if (elements[i].src && elements[i].src.match(/edit_area_[^\\\/]*$/i) ){var src=elements[i].src;src=src.substring(0, src.lastIndexOf('/'));this.baseURL=src;this.file_name=elements[i].src.substr(elements[i].src.lastIndexOf("/")+1);break;}}}var documentBasePath=document.location.href;if (documentBasePath.indexOf('?') !=-1) documentBasePath=documentBasePath.substring(0, documentBasePath.indexOf('?'));var documentURL=documentBasePath;documentBasePath=documentBasePath.substring(0, documentBasePath.lastIndexOf('/'));if (this.baseURL.indexOf('://')==-1 && this.baseURL.charAt(0) !='/'){this.baseURL=documentBasePath + "/" + this.baseURL;}this.baseURL+="/";};EAL.prototype.get_button_html=function(id, img, exec, isFileSpecific, baseURL){if(!baseURL) baseURL=this.baseURL;var cmd='editArea.execCommand(\'' + exec + '\')';html='<a id="a_'+ id +'" href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self" fileSpecific="'+ (isFileSpecific?'yes':'no') +'">';html+='<img id="' + id + '" src="'+ baseURL +'images/' + img + '" title="{$' + id + '}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;};EAL.prototype.get_control_html=function(button_name, lang){for (var i=0;i<this.advanced_buttons.length;i++){var but=this.advanced_buttons[i];if (but[0]==button_name){return this.get_button_html(but[0], but[1], but[2], but[3]);}}switch (button_name){case "*": case "return": return "<br />";case "|": case "separator": return '<img src="'+ this.baseURL +'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font": html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>" +" <option value='-1'>{$font_size}</option>" +" <option value='8'>8 pt</option>" +" <option value='9'>9 pt</option>" +" <option value='10'>10 pt</option>" +" <option value='11'>11 pt</option>" +" <option value='12'>12 pt</option>" +" <option value='14'>14 pt</option>" +" </select>";return html;case "syntax_selection": var html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\", this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";};EAL.prototype.get_template=function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest();
+else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
+else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET", this.baseURL+"template.html", false);xhr_object.send(null);if(xhr_object.readyState==4) this.template=xhr_object.responseText;
+else this.has_error();}};EAL.prototype.translate=function(text, lang, mode){if(mode=="word") text=eAL.get_word_translation(text, lang);
+else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm, eAL.translate_template);}return text;};EAL.prototype.translate_template=function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1], eAL.current_language);};EAL.prototype.get_word_translation=function(val, lang){for(var i in eAL.lang[lang]){if(i==val) return eAL.lang[lang][i];}return "_"+val;};EAL.prototype.load_script=function(url){if (this.loadedFiles[url]) return;try{var script=document.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";var head=document.getElementsByTagName("head");head[0].appendChild(script);}catch(e){document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '" charset="UTF-8"></sc'+'ript>');}this.loadedFiles[url]=true;};EAL.prototype.add_event=function(obj, name, handler){if (obj.attachEvent){obj.attachEvent("on" + name, handler);}
+else{obj.addEventListener(name, handler, false);}};EAL.prototype.remove_event=function(obj, name, handler){if (obj.detachEvent) obj.detachEvent("on" + name, handler);
+else obj.removeEventListener(name, handler, false);};EAL.prototype.reset=function(e){var formObj=eAL.nav['isIE'] ? window.event.srcElement : e.target;if(formObj.tagName!='FORM') formObj=formObj.form;for(var i in eAs){var is_child=false;for (var x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i) is_child=true;}if(window.frames["frame_"+i] && is_child && eAs[i]["displayed"]==true){var exec='window.frames["frame_'+ i +'"].editArea.textarea.value=document.getElementById("'+ i +'").value;';exec+='window.frames["frame_'+ i +'"].editArea.execCommand("focus");';exec+='window.frames["frame_'+ i +'"].editArea.check_line_selection();';exec+='window.frames["frame_'+ i +'"].editArea.execCommand("reset");';window.setTimeout(exec, 10);}}return;};EAL.prototype.submit=function(e){var formObj=eAL.nav['isIE'] ? window.event.srcElement : e.target;if(formObj.tagName!='FORM') formObj=formObj.form;for(var i in eAs){var is_child=false;for (var x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i) is_child=true;}if(is_child){if(window.frames["frame_"+i] && eAs[i]["displayed"]==true) document.getElementById(i).value=window.frames["frame_"+ i].editArea.textarea.value;eAL.execCommand(i,"EA_submit");}}if(typeof(formObj.edit_area_replaced_submit)=="function"){res=formObj.edit_area_replaced_submit();if(res==false){if(eAL.nav['isIE']) return false;
+else e.preventDefault();}}return;};EAL.prototype.getValue=function(id){if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){return window.frames["frame_"+ id].editArea.textarea.value;}
+else if(elem=document.getElementById(id)){return elem.value;}return false;};EAL.prototype.setValue=function(id, new_val){if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].editArea.textarea.value=new_val;window.frames["frame_"+ id].editArea.execCommand("focus");window.frames["frame_"+ id].editArea.check_line_selection(false);window.frames["frame_"+ id].editArea.execCommand("onchange");}
+else if(elem=document.getElementById(id)){elem.value=new_val;}};EAL.prototype.getSelectionRange=function(id){var sel={"start": 0, "end": 0};if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var editArea=window.frames["frame_"+ id].editArea;sel["start"]=editArea.textarea.selectionStart;sel["end"]=editArea.textarea.selectionEnd;}
+else if(elem=document.getElementById(id)){sel=getSelectionRange(elem);}return sel;};EAL.prototype.setSelectionRange=function(id, new_start, new_end){if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].editArea.area_select(new_start, new_end-new_start);if(!this.nav['isIE']){window.frames["frame_"+ id].editArea.check_line_selection(false);window.frames["frame_"+ id].editArea.scroll_to_view();}}
+else if(elem=document.getElementById(id)){setSelectionRange(elem, new_start, new_end);}};EAL.prototype.getSelectedText=function(id){var sel=this.getSelectionRange(id);return this.getValue(id).substring(sel["start"], sel["end"]);};EAL.prototype.setSelectedText=function(id, new_val){new_val=new_val.replace(/\r/g, "");var sel=this.getSelectionRange(id);var text=this.getValue(id);if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var scrollTop=window.frames["frame_"+ id].document.getElementById("result").scrollTop;var scrollLeft=window.frames["frame_"+ id].document.getElementById("result").scrollLeft;}
+else{var scrollTop=document.getElementById(id).scrollTop;var scrollLeft=document.getElementById(id).scrollLeft;}text=text.substring(0, sel["start"])+ new_val +text.substring(sel["end"]);this.setValue(id, text);var new_sel_end=sel["start"]+ new_val.length;this.setSelectionRange(id, sel["start"], new_sel_end);if(new_val !=this.getSelectedText(id).replace(/\r/g, "")){this.setSelectionRange(id, sel["start"], new_sel_end+ new_val.split("\n").length -1);}if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+ id].document.getElementById("result").scrollLeft=scrollLeft;window.frames["frame_"+ id].editArea.execCommand("onchange");}
+else{document.getElementById(id).scrollTop=scrollTop;document.getElementById(id).scrollLeft=scrollLeft;}};EAL.prototype.insertTags=function(id, open_tag, close_tag){var old_sel=this.getSelectionRange(id);text=open_tag + this.getSelectedText(id) + close_tag;eAL.setSelectedText(id, text);var new_sel=this.getSelectionRange(id);if(old_sel["end"] > old_sel["start"]) this.setSelectionRange(id, new_sel["end"], new_sel["end"]);
+else this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);};EAL.prototype.hide=function(id){if(document.getElementById(id) && !this.hidden[id]){this.hidden[id]=new Object();this.hidden[id]["selectionRange"]=this.getSelectionRange(id);if(document.getElementById(id).style.display!="none"){this.hidden[id]["scrollTop"]=document.getElementById(id).scrollTop;this.hidden[id]["scrollLeft"]=document.getElementById(id).scrollLeft;}if(window.frames["frame_"+id]){this.hidden[id]["toggle"]=eAs[id]["displayed"];if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var scrollTop=window.frames["frame_"+ id].document.getElementById("result").scrollTop;var scrollLeft=window.frames["frame_"+ id].document.getElementById("result").scrollLeft;}
+else{var scrollTop=document.getElementById(id).scrollTop;var scrollLeft=document.getElementById(id).scrollLeft;}this.hidden[id]["scrollTop"]=scrollTop;this.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true) eAL.toggle_off(id);}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}document.getElementById(id).style.display="none";}};EAL.prototype.show=function(id){if((elem=document.getElementById(id)) && this.hidden[id]){elem.style.display="inline";elem.scrollTop=this.hidden[id]["scrollTop"];elem.scrollLeft=this.hidden[id]["scrollLeft"];var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(window.frames["frame_"+id]){elem.style.display="inline";if(this.hidden[id]["toggle"]==true) eAL.toggle_on(id);scrollTop=this.hidden[id]["scrollTop"];scrollLeft=this.hidden[id]["scrollLeft"];if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+ id].document.getElementById("result").scrollLeft=scrollLeft;}
+else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=this.hidden[id]["selectionRange"];this.setSelectionRange(id, sel["start"], sel["end"]);delete this.hidden[id];}};EAL.prototype.getCurrentFile=function(id){return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));};EAL.prototype.getFile=function(id, file_id){return this.execCommand(id, 'get_file', file_id);};EAL.prototype.getAllFiles=function(id){return this.execCommand(id, 'get_all_files()');};EAL.prototype.openFile=function(id, file_infos){return this.execCommand(id, 'open_file', file_infos);};EAL.prototype.closeFile=function(id, file_id){return this.execCommand(id, 'close_file', file_id);};EAL.prototype.setFileEditedMode=function(id, file_id, to){var reg1=new RegExp('\\\\', 'g');var reg2=new RegExp('"', 'g');return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');};EAL.prototype.execCommand=function(id, cmd, fct_param){switch(cmd){case "EA_init": if(eAs[id]['settings']["EA_init_callback"].length>0) eval(eAs[id]['settings']["EA_init_callback"]+"('"+ id +"');");break;case "EA_delete": if(eAs[id]['settings']["EA_delete_callback"].length>0) eval(eAs[id]['settings']["EA_delete_callback"]+"('"+ id +"');");break;case "EA_submit": if(eAs[id]['settings']["submit_callback"].length>0) eval(eAs[id]['settings']["submit_callback"]+"('"+ id +"');");break;}if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){if(fct_param!=undefined) return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');
+else return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');}return false;};var eAL=new EAL();var eAs=new Object(); function getAttribute( elm, aname ){try{var avalue=elm.getAttribute( aname );}catch(exept){}if ( ! avalue ){for ( var i=0;i < elm.attributes.length;i ++ ){var taName=elm.attributes [i] .name.toLowerCase();if ( taName==aname ){avalue=elm.attributes [i] .value;return avalue;}}}return avalue;};function setAttribute( elm, attr, val ){if(attr=="class"){elm.setAttribute("className", val);elm.setAttribute("class", val);}
+else{elm.setAttribute(attr, val);}};function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth){if(!option) var option="single";if(!depth) var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=new Array();for (var x=0;x<children.length;x++){strTagName=new String(children[x].tagName);children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(children[x],elem_attribute);if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){if(option=="all"){results.push(children[x]);}
+else{return children[x];}}if(depth!=0){result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);if(option=="all"){if(result.length>0){results=results.concat(result);}}
+else if(result!=null){return result;}}}}if(option=="all") return results;}return null;};function isChildOf(elem, parent){if(elem){if(elem==parent) return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode, parent);}}return false;};function getMouseX(e){if(e!=null && typeof(e.pageX)!="undefined"){return e.pageX;}
+else{return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null && typeof(e.pageY)!="undefined"){return e.pageY;}
+else{return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft") };function calculeOffsetTop(r){return calculeOffset(r,"offsetTop") };function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem, prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);}
+else if(elem.currentStyle){var prop=prop.replace(/-\D/gi, function(sMatch){return sMatch.charAt(sMatch.length - 1).toUpperCase();});return elem.currentStyle[prop];}
+else return null;}var move_current_element;function start_move_element(e, id, frame){var elem_id=(e.target || e.srcElement).id;if(id) elem_id=id;if(!frame) frame=window;if(frame.event) e=frame.event;move_current_element=frame.document.getElementById(elem_id);move_current_element.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);move_current_element.start_pos_x=mouse_x - (move_current_element.style.left.replace("px","") || calculeOffsetLeft(move_current_element));move_current_element.start_pos_y=mouse_y - (move_current_element.style.top.replace("px","") || calculeOffsetTop(move_current_element));return false;};function end_move_element(e){move_current_element.frame.document.onmousemove="";move_current_element.frame.document.onmouseup="";move_current_element=null;};function move_element(e){if(move_current_element.frame && move_current_element.frame.event) e=move_current_element.frame.event;var mouse_x=getMouseX(e);var mouse_y=getMouseY(e);var new_top=mouse_y - move_current_element.start_pos_y;var new_left=mouse_x - move_current_element.start_pos_x;var max_left=move_current_element.frame.document.body.offsetWidth- move_current_element.offsetWidth;max_top=move_current_element.frame.document.body.offsetHeight- move_current_element.offsetHeight;new_top=Math.min(Math.max(0, new_top), max_top);new_left=Math.min(Math.max(0, new_left), max_left);move_current_element.style.top=new_top+"px";move_current_element.style.left=new_left+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return {"start": textarea.selectionStart, "end": textarea.selectionEnd};};function setSelectionRange(textarea, start, end){textarea.focus();start=Math.max(0, Math.min(textarea.value.length, start));end=Math.max(start, Math.min(textarea.value.length, end));if(nav['isOpera']){textarea.selectionEnd=1;textarea.selectionStart=0;textarea.selectionEnd=1;textarea.selectionStart=0;}textarea.selectionStart=start;textarea.selectionEnd=end;if(nav['isIE']) set_IE_selection(textarea);};function get_IE_selection(textarea){if(textarea && textarea.focused){if(!textarea.ea_line_height){var div=document.createElement("div");div.style.fontFamily=get_css_property(textarea, "font-family");div.style.fontSize=get_css_property(textarea, "font-size");div.style.visibility="hidden";div.innerHTML="0";document.body.appendChild(div);textarea.ea_line_height=div.offsetHeight;document.body.removeChild(div);}var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText( textarea );stored_range.setEndPoint( 'EndToEnd', range );if(stored_range.parentElement()==textarea){var elem=textarea;var scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}var relative_top=range.offsetTop - calculeOffsetTop(textarea)+ scrollTop;var line_start=Math.round((relative_top / textarea.ea_line_height) +1);var line_nb=Math.round(range.boundingHeight / textarea.ea_line_height);var range_start=stored_range.text.length - range.text.length;var tab=textarea.value.substr(0, range_start).split("\n");range_start+=(line_start - tab.length)*2;textarea.selectionStart=range_start;var range_end=textarea.selectionStart + range.text.length;tab=textarea.value.substr(0, range_start + range.text.length).split("\n");range_end+=(line_start + line_nb - 1 - tab.length)*2;textarea.selectionEnd=range_end;}}setTimeout("get_IE_selection(document.getElementById('"+ textarea.id +"'));", 50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(textarea){if(!window.closed){var nbLineStart=textarea.value.substr(0, textarea.selectionStart).split("\n").length - 1;var nbLineEnd=textarea.value.substr(0, textarea.selectionEnd).split("\n").length - 1;var range=document.selection.createRange();range.moveToElementText( textarea );range.setEndPoint( 'EndToStart', range );range.moveStart('character', textarea.selectionStart - nbLineStart);range.moveEnd('character', textarea.selectionEnd - nbLineEnd - (textarea.selectionStart - nbLineStart) );range.select();}};eAL.waiting_loading["elements_functions.js"]="loaded";
+ EAL.prototype.start_resize_area=function(){document.onmouseup=eAL.end_resize_area;document.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);var textarea=eAs[eAL.resize["id"]]["textarea"];var div=document.getElementById("edit_area_resize");if(!div){div=document.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}var width=textarea.offsetWidth -2;var height=textarea.offsetHeight -2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";var father=textarea.parentNode;father.insertBefore(div, textarea);textarea.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){document.onmouseup="";document.onmousemove="";var div=document.getElementById("edit_area_resize");var textarea=eAs[eAL.resize["id"]]["textarea"];var width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);var height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);if(eAL.nav['isIE']==6){width-=2;height-=2;}textarea.style.width=width+"px";textarea.style.height=height+"px";div.style.display="none";textarea.style.display="inline";textarea.selectionStart=eAL.resize["selectionStart"];textarea.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both" || allow=="y"){new_y=getMouseY(e);var new_height=Math.max(20, new_y- eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=new_height+"px";}if(allow=="both" || allow=="x"){new_x=getMouseX(e);var new_width=Math.max(20, new_x- eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=new_width+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";
+ EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i<text_array.length;i++){if(i>0) res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style=new Object();for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]=new Object();this.syntax[lang]["keywords_reg_exp"]=new Object();this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false) param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0) this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0) this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=new Array();this.syntax[lang]["quotes"]=new Object();var quote_tab=new Array();if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]=new Object();if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0) this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0) this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]=new Object();for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]=new Object();if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']]) this.syntax[lang]["custom_regexp"][val['execute']]=new Object();this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers']) , 'class' : val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]=new Object();for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;if(typeof(this.load_syntax[lang]['STYLES'][i]) !="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}}
+else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";style+="."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded";
+var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "<script language='Javascript' type='text/javascript'> function EA(){this.error=false;this.inlinePopup=new Array({popup_id: \"area_search_replace\", icon_id: \"search\"}, {popup_id: \"edit_area_help\", icon_id: \"help\"});this.plugins=new Object();this.line_number=0;this.nav=parent.eAL.nav;this.last_selection=new Object();this.last_text_to_highlight=\"\";this.last_hightlighted_text=\"\";this.syntax_list=new Array();this.allready_used_syntax=new Object();this.textareaFocused=false;this.previous=new Array();this.next=new Array();this.last_undo=\"\";this.files=new Object();this.filesIdAssoc=new Object();this.curr_file='';this.assocBracket=new Object();this.revertAssocBracket=new Object();this.assocBracket[\"(\"]=\")\";this.assocBracket[\"{\"]=\"}\";this.assocBracket[\"[\"]=\"]\";for(var index in this.assocBracket){this.revertAssocBracket[this.assocBracket[index]]=index;}this.is_editable=true;this.lineHeight=16;this.tab_nb_char=8;if(this.nav['isOpera']) this.tab_nb_char=6;this.is_tabbing=false;this.fullscreen={'isFull': false};this.isResizing=false;this.id=area_id;this.settings=eAs[this.id][\"settings\"];if((\"\"+this.settings['replace_tab_by_spaces']).match(/^[0-9]+$/)){this.tab_nb_char=this.settings['replace_tab_by_spaces'];this.tabulation=\"\";for(var i=0;i<this.tab_nb_char;i++) this.tabulation+=\" \";}\nelse{this.tabulation=\"\t\";}if(this.settings[\"syntax_selection_allow\"] && this.settings[\"syntax_selection_allow\"].length>0) this.syntax_list=this.settings[\"syntax_selection_allow\"].replace(/ /g,\"\").split(\",\");if(this.settings['syntax']) this.allready_used_syntax[this.settings['syntax']]=true;};EA.prototype.update_size=function(){if(eAs[eA.id] && eAs[eA.id][\"displayed\"]==true){if(eA.fullscreen['isFull']){parent.document.getElementById(\"frame_\"+eA.id).style.width=parent.document.getElementsByTagName(\"html\")[0].clientWidth + \"px\";parent.document.getElementById(\"frame_\"+eA.id).style.height=parent.document.getElementsByTagName(\"html\")[0].clientHeight + \"px\";}if(eA.tab_browsing_area.style.display=='block' && !eA.nav['isIE']){eA.tab_browsing_area.style.height=\"0px\";eA.tab_browsing_area.style.height=(eA.result.offsetTop - eA.tab_browsing_area.offsetTop -1)+\"px\";}var height=document.body.offsetHeight - eA.get_all_toolbar_height() - 4;eA.result.style.height=height +\"px\";var width=document.body.offsetWidth -2;eA.result.style.width=width+\"px\";for(var i=0;i<eA.inlinePopup.length;i++){var popup=document.getElementById(eA.inlinePopup[i][\"popup_id\"]);var max_left=document.body.offsetWidth- popup.offsetWidth;var max_top=document.body.offsetHeight- popup.offsetHeight;if(popup.offsetTop>max_top) popup.style.top=max_top+\"px\";if(popup.offsetLeft>max_left) popup.style.left=max_left+\"px\";}}};EA.prototype.init=function(){this.textarea=document.getElementById(\"textarea\");this.container=document.getElementById(\"container\");this.result=document.getElementById(\"result\");this.content_highlight=document.getElementById(\"content_highlight\");this.selection_field=document.getElementById(\"selection_field\");this.processing_screen=document.getElementById(\"processing\");this.editor_area=document.getElementById(\"editor\");this.tab_browsing_area=document.getElementById(\"tab_browsing_area\");if(!this.settings['is_editable']) this.set_editable(false);if(syntax_selec=document.getElementById(\"syntax_selection\")){for(var i=0;i<this.syntax_list.length;i++){var syntax=this.syntax_list[i];var option=document.createElement(\"option\");option.value=syntax;if(syntax==this.settings['syntax']) option.selected=\"selected\";option.innerHTML=this.get_translation(\"syntax_\" + syntax, \"word\");syntax_selec.appendChild(option);}}spans=parent.getChildren(document.getElementById(\"toolbar_1\"), \"span\", \"\", \"\", \"all\", -1);for(var i=0;i<spans.length;i++){id=spans[i].id.replace(/tmp_tool_(.*)/, \"$1\");if(id!=spans[i].id){for(var j in this.plugins){if(typeof(this.plugins[j].get_control_html)==\"function\" ){html=this.plugins[j].get_control_html(id);if(html!=false){html=this.get_translation(html, \"template\");var new_span=document.createElement(\"span\");new_span.innerHTML=html;var father=spans[i].parentNode;spans[i].parentNode.replaceChild(new_span, spans[i]);break;}}}}}this.textarea.value=eAs[this.id][\"textarea\"].value;if(this.settings[\"debug\"]) this.debug=parent.document.getElementById(\"edit_area_debug_\"+this.id);if(document.getElementById(\"redo\") !=null) this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonDisabled', true);if(typeof(parent.eAL.syntax[this.settings[\"syntax\"]])!=\"undefined\"){for(var i in parent.eAL.syntax){this.add_style(parent.eAL.syntax[i][\"styles\"]);}}if(this.nav['isOpera']) document.getElementById(\"editor\").onkeypress=keyDown;\nelse document.getElementById(\"editor\").onkeydown=keyDown;for(var i=0;i<this.inlinePopup.length;i++){if(this.nav['isIE'] || this.nav['isFirefox']) document.getElementById(this.inlinePopup[i][\"popup_id\"]).onkeydown=keyDown;\nelse document.getElementById(this.inlinePopup[i][\"popup_id\"]).onkeypress=keyDown;}if(this.settings[\"allow_resize\"]==\"both\" || this.settings[\"allow_resize\"]==\"x\" || this.settings[\"allow_resize\"]==\"y\") this.allow_resize(true);parent.eAL.toggle(this.id, \"on\");this.change_smooth_selection_mode(eA.smooth_selection);this.execCommand(\"change_highlight\", this.settings[\"start_highlight\"]);this.set_font(eA.settings[\"font_family\"], eA.settings[\"font_size\"]);children=parent.getChildren(document.body, \"\", \"selec\", \"none\", \"all\", -1);for(var i=0;i<children.length;i++){if(this.nav['isIE']) children[i].unselectable=true;\nelse children[i].onmousedown=function(){return false};}if(this.nav['isGecko']){this.textarea.spellcheck=this.settings[\"gecko_spellcheck\"];}if(this.nav['isOpera']){this.editor_area.style.position=\"absolute\";this.selection_field.style.marginTop=\"-1pt\";this.selection_field.style.paddingTop=\"1pt\";document.getElementById(\"cursor_pos\").style.marginTop=\"-1pt\";document.getElementById(\"end_bracket\").style.marginTop=\"-1pt\";this.content_highlight.style.marginTop=\"-1pt\";}if(this.nav['isSafari']){this.editor_area.style.position=\"absolute\";this.selection_field.style.marginTop=\"-1pt\";this.selection_field.style.paddingTop=\"1pt\";this.selection_field.style.marginLeft=\"3px\";this.content_highlight.style.marginTop=\"-1pt\";this.content_highlight.style.marginLeft=\"3px\";document.getElementById(\"cursor_pos\").style.marginLeft=\"3px\";document.getElementById(\"end_bracket\").style.marginLeft=\"3px\";}parent.eAL.add_event(this.result, \"click\", function(e){if((e.target || e.srcElement)==eA.result){eA.area_select(eA.textarea.value.length, 0);}});if(this.settings['is_multi_files']!=false) this.open_file({'id': this.curr_file, 'text': ''});setTimeout(\"eA.focus();eA.manage_size();eA.execCommand('EA_load');\", 10);this.check_undo();this.check_line_selection(true);this.scroll_to_view();for(var i in this.plugins){if(typeof(this.plugins[i].onload)==\"function\") this.plugins[i].onload();}if(this.settings['fullscreen']==true) this.toggle_full_screen(true);parent.eAL.add_event(window, \"resize\", eA.update_size);parent.eAL.add_event(parent.window, \"resize\", eA.update_size);parent.eAL.add_event(top.window, \"resize\", eA.update_size);parent.eAL.add_event(window, \"unload\", function(){if(eAs[eA.id] && eAs[eA.id][\"displayed\"]) eA.execCommand(\"EA_unload\");});};EA.prototype.manage_size=function(onlyOneTime){if(!eAs[this.id]) return false;if(eAs[this.id][\"displayed\"]==true && this.textareaFocused){var resized=false;var area_width=this.textarea.scrollWidth;var area_height=this.textarea.scrollHeight;if(this.nav['isOpera']){area_height=this.last_selection['nb_line']*this.lineHeight;area_width=10000;}if(this.nav['isIE']>=7) area_width-=45;if(this.nav['isGecko'] && this.smooth_selection && this.last_selection[\"nb_line\"]) area_height=this.last_selection[\"nb_line\"]*this.lineHeight;if(this.textarea.previous_scrollWidth!=area_width){if(!this.nav['isOpera'] && this.textarea.style.width && (this.textarea.style.width.replace(\"px\",\"\") < area_width)) area_width+=50;if(this.nav['isGecko'] || this.nav['isOpera']) this.container.style.width=(area_width+45)+\"px\";\nelse this.container.style.width=area_width+\"px\";this.textarea.style.width=area_width+\"px\";this.content_highlight.style.width=area_width+\"px\";this.textarea.previous_scrollWidth=area_width;resized=true;}var area_height=this.textarea.scrollHeight;if(this.nav['isOpera']){area_height=this.last_selection['nb_line']*this.lineHeight;}if(this.nav['isGecko'] && this.smooth_selection && this.last_selection[\"nb_line\"]) area_height=this.last_selection[\"nb_line\"]*this.lineHeight;if(this.textarea.previous_scrollHeight!=area_height){this.container.style.height=(area_height+2)+\"px\";this.textarea.style.height=area_height+\"px\";this.content_highlight.style.height=area_height+\"px\";this.textarea.previous_scrollHeight=area_height;resized=true;}if(this.last_selection[\"nb_line\"] >=this.line_number){var div_line_number=\"\";for(i=this.line_number+1;i<this.last_selection[\"nb_line\"]+100;i++){div_line_number+=i+\"<br />\";this.line_number++;}var span=document.createElement(\"span\");if(this.nav['isIE']) span.unselectable=true;span.innerHTML=div_line_number;document.getElementById(\"line_number\").appendChild(span);}this.textarea.scrollTop=\"0px\";this.textarea.scrollLeft=\"0px\";if(resized==true){this.scroll_to_view();}}if(!onlyOneTime) setTimeout(\"eA.manage_size();\", 100);};EA.prototype.add_event=function(obj, name, handler){if (this.nav['isIE']){obj.attachEvent(\"on\" + name, handler);}\nelse{obj.addEventListener(name, handler, false);}};EA.prototype.execCommand=function(cmd, param){for(var i in this.plugins){if(typeof(this.plugins[i].execCommand)==\"function\"){if(!this.plugins[i].execCommand(cmd, param)) return;}}switch(cmd){case \"save\": if(this.settings[\"save_callback\"].length>0) eval(\"parent.\"+this.settings[\"save_callback\"]+\"('\"+ this.id +\"', eA.textarea.value);\");break;case \"load\": if(this.settings[\"load_callback\"].length>0) eval(\"parent.\"+this.settings[\"load_callback\"]+\"('\"+ this.id +\"');\");break;case \"onchange\": if(this.settings[\"change_callback\"].length>0) eval(\"parent.\"+this.settings[\"change_callback\"]+\"('\"+ this.id +\"');\");break;case \"EA_load\": if(this.settings[\"EA_load_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_load_callback\"]+\"('\"+ this.id +\"');\");break;case \"EA_unload\": if(this.settings[\"EA_unload_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_unload_callback\"]+\"('\"+ this.id +\"');\");break;case \"toggle_on\": if(this.settings[\"EA_toggle_on_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_toggle_on_callback\"]+\"('\"+ this.id +\"');\");break;case \"toggle_off\": if(this.settings[\"EA_toggle_off_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_toggle_off_callback\"]+\"('\"+ this.id +\"');\");break;case \"re_sync\": if(!this.do_highlight) break;case \"file_switch_on\": if(this.settings[\"EA_file_switch_on_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_file_switch_on_callback\"]+\"(param);\");break;case \"file_switch_off\": if(this.settings[\"EA_file_switch_off_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_file_switch_off_callback\"]+\"(param);\");break;case \"file_close\": if(this.settings[\"EA_file_close_callback\"].length>0) return eval(\"parent.\"+this.settings[\"EA_file_close_callback\"]+\"(param);\");break;default: if(typeof(eval(\"eA.\"+cmd))==\"function\"){if(this.settings[\"debug\"]) eval(\"eA.\"+ cmd +\"(param);\");\nelse try{eval(\"eA.\"+ cmd +\"(param);\");}catch(e){};}}};EA.prototype.get_translation=function(word, mode){if(mode==\"template\") return parent.eAL.translate(word, this.settings[\"language\"], mode);\nelse return parent.eAL.get_word_translation(word, this.settings[\"language\"]);};EA.prototype.add_plugin=function(plug_name, plug_obj){for(var i=0;i<this.settings[\"plugins\"].length;i++){if(this.settings[\"plugins\"][i]==plug_name){this.plugins[plug_name]=plug_obj;plug_obj.baseURL=parent.eAL.baseURL + \"plugins/\" + plug_name + \"/\";if( typeof(plug_obj.init)==\"function\" ) plug_obj.init();}}};EA.prototype.load_css=function(url){try{link=document.createElement(\"link\");link.type=\"text/css\";link.rel=\"stylesheet\";link.media=\"all\";link.href=url;head=document.getElementsByTagName(\"head\");head[0].appendChild(link);}catch(e){document.write(\"<link href='\"+ url +\"' rel='stylesheet' type='text/css' />\");}};EA.prototype.load_script=function(url){try{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src =url;script.charset=\"UTF-8\";head=document.getElementsByTagName(\"head\");head[0].appendChild(script);}catch(e){document.write(\"<script type='text/javascript' src='\" + url + \"' charset=\\\"UTF-8\\\"><\"+\"/script>\");}};EA.prototype.add_lang=function(language, values){if(!parent.eAL.lang[language]) parent.eAL.lang[language]=new Object();for(var i in values) parent.eAL.lang[language][i]=values[i];};var eA=new EA();eA.add_event(window, \"load\", init);function init(){setTimeout(\"eA.init();\", 10);}; EA.prototype.focus=function(){this.textarea.focus();this.textareaFocused=true;};EA.prototype.check_line_selection=function(timer_checkup){if(!eAs[this.id]) return false;if(!this.smooth_selection && !this.do_highlight){}\nelse if(this.textareaFocused && eAs[this.id][\"displayed\"]==true && this.isResizing==false){infos=this.get_selection_infos();if(this.last_selection[\"line_start\"] !=infos[\"line_start\"] || this.last_selection[\"line_nb\"] !=infos[\"line_nb\"] || infos[\"full_text\"] !=this.last_selection[\"full_text\"] || this.reload_highlight){new_top=this.lineHeight * (infos[\"line_start\"]-1);new_height=Math.max(0, this.lineHeight * infos[\"line_nb\"]);new_width=Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);this.selection_field.style.top=new_top+\"px\";this.selection_field.style.width=new_width+\"px\";this.selection_field.style.height=new_height+\"px\";document.getElementById(\"cursor_pos\").style.top=new_top+\"px\";if(this.do_highlight==true){var curr_text=infos[\"full_text\"].split(\"\\n\");var content=\"\";var start=Math.max(0,infos[\"line_start\"]-1);var end=Math.min(curr_text.length, infos[\"line_start\"]+infos[\"line_nb\"]-1);for(i=start;i< end;i++){content+=curr_text[i]+\"\\n\";}content=content.replace(/&/g,\"&amp;\");content=content.replace(/</g,\"&lt;\");content=content.replace(/>/g,\"&gt;\");if(this.nav['isIE'] || this.nav['isOpera']) this.selection_field.innerHTML=\"<pre>\" + content.replace(\"\\n\", \"<br/>\") + \"</pre>\";\nelse this.selection_field.innerHTML=content;if(this.reload_highlight || (infos[\"full_text\"] !=this.last_text_to_highlight && (this.last_selection[\"line_start\"]!=infos[\"line_start\"] || this.last_selection[\"line_nb\"]!=infos[\"line_nb\"] || this.last_selection[\"nb_line\"]!=infos[\"nb_line\"]) ) ) this.maj_highlight(infos);}}if(infos[\"line_start\"] !=this.last_selection[\"line_start\"] || infos[\"curr_pos\"] !=this.last_selection[\"curr_pos\"] || infos[\"full_text\"].length!=this.last_selection[\"full_text\"].length || this.reload_highlight){var selec_char=infos[\"curr_line\"].charAt(infos[\"curr_pos\"]-1);var no_real_move=true;if(infos[\"line_nb\"]==1 && (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]) ){no_real_move=false;if(this.findEndBracket(infos, selec_char) ===true){document.getElementById(\"end_bracket\").style.visibility=\"visible\";document.getElementById(\"cursor_pos\").style.visibility=\"visible\";document.getElementById(\"cursor_pos\").innerHTML=selec_char;document.getElementById(\"end_bracket\").innerHTML=(this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]);}\nelse{document.getElementById(\"end_bracket\").style.visibility=\"hidden\";document.getElementById(\"cursor_pos\").style.visibility=\"hidden\";}}\nelse{document.getElementById(\"cursor_pos\").style.visibility=\"hidden\";document.getElementById(\"end_bracket\").style.visibility=\"hidden\";}this.displayToCursorPosition(\"cursor_pos\", infos[\"line_start\"], infos[\"curr_pos\"]-1, infos[\"curr_line\"], no_real_move);if(infos[\"line_nb\"]==1 && infos[\"line_start\"]!=this.last_selection[\"line_start\"]) this.scroll_to_view();}this.last_selection=infos;}if(timer_checkup){if(this.do_highlight==true) setTimeout(\"eA.check_line_selection(true)\", 50);\nelse setTimeout(\"eA.check_line_selection(true)\", 50);}};EA.prototype.get_selection_infos=function(){if(this.nav['isIE']) this.getIESelection();start=this.textarea.selectionStart;end=this.textarea.selectionEnd;if(this.last_selection[\"selectionStart\"]==start && this.last_selection[\"selectionEnd\"]==end && this.last_selection[\"full_text\"]==this.textarea.value) return this.last_selection;if(this.tabulation!=\"\t\" && this.textarea.value.indexOf(\"\t\")!=-1){var len=this.textarea.value.length;this.textarea.value=this.replace_tab(this.textarea.value);start=end=start+(this.textarea.value.length-len);this.area_select(start, 0);}var selections=new Object();selections[\"selectionStart\"]=start;selections[\"selectionEnd\"]=end;selections[\"full_text\"]=this.textarea.value;selections[\"line_start\"]=1;selections[\"line_nb\"]=1;selections[\"curr_pos\"]=0;selections[\"curr_line\"]=\"\";selections[\"indexOfCursor\"]=0;selections[\"selec_direction\"]=this.last_selection[\"selec_direction\"];var splitTab=selections[\"full_text\"].split(\"\\n\");var nbLine=Math.max(0, splitTab.length);var nbChar=Math.max(0, selections[\"full_text\"].length - (nbLine - 1));if(selections[\"full_text\"].indexOf(\"\\r\")!=-1) nbChar=nbChar - (nbLine -1);selections[\"nb_line\"]=nbLine;selections[\"nb_char\"]=nbChar;if(start>0){var str=selections[\"full_text\"].substr(0,start);selections[\"curr_pos\"]=start - str.lastIndexOf(\"\\n\");selections[\"line_start\"]=Math.max(1, str.split(\"\\n\").length);}\nelse{selections[\"curr_pos\"]=1;}if(end>start){selections[\"line_nb\"]=selections[\"full_text\"].substring(start,end).split(\"\\n\").length;}selections[\"indexOfCursor\"]=this.textarea.selectionStart;selections[\"curr_line\"]=splitTab[Math.max(0,selections[\"line_start\"]-1)];if(selections[\"selectionStart\"]==this.last_selection[\"selectionStart\"]){if(selections[\"selectionEnd\"]>this.last_selection[\"selectionEnd\"]) selections[\"selec_direction\"]=\"down\";\nelse if(selections[\"selectionEnd\"]==this.last_selection[\"selectionStart\"]) selections[\"selec_direction\"]=this.last_selection[\"selec_direction\"];}\nelse if(selections[\"selectionStart\"]==this.last_selection[\"selectionEnd\"] && selections[\"selectionEnd\"]>this.last_selection[\"selectionEnd\"]){selections[\"selec_direction\"]=\"down\";}\nelse{selections[\"selec_direction\"]=\"up\";}document.getElementById(\"nbLine\").innerHTML=nbLine;document.getElementById(\"nbChar\").innerHTML=nbChar;document.getElementById(\"linePos\").innerHTML=selections[\"line_start\"];document.getElementById(\"currPos\").innerHTML=selections[\"curr_pos\"];return selections;};EA.prototype.getIESelection=function(){var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText( this.textarea );stored_range.setEndPoint( 'EndToEnd', range );if(stored_range.parentElement() !=this.textarea) return;var scrollTop=this.result.scrollTop + document.body.scrollTop;var relative_top=range.offsetTop - parent.calculeOffsetTop(this.textarea) + scrollTop;var line_start=Math.round((relative_top / this.lineHeight) +1);var line_nb=Math.round(range.boundingHeight / this.lineHeight);var range_start=stored_range.text.length - range.text.length;var tab=this.textarea.value.substr(0, range_start).split(\"\\n\");range_start+=(line_start - tab.length)*2;this.textarea.selectionStart=range_start;var range_end=this.textarea.selectionStart + range.text.length;tab=this.textarea.value.substr(0, range_start + range.text.length).split(\"\\n\");range_end+=(line_start + line_nb - 1 - tab.length)*2;this.textarea.selectionEnd=range_end;};EA.prototype.setIESelection=function(){var nbLineStart=this.textarea.value.substr(0, this.textarea.selectionStart).split(\"\\n\").length - 1;var nbLineEnd=this.textarea.value.substr(0, this.textarea.selectionEnd).split(\"\\n\").length - 1;var range=document.selection.createRange();range.moveToElementText( this.textarea );range.setEndPoint( 'EndToStart', range );range.moveStart('character', this.textarea.selectionStart - nbLineStart);range.moveEnd('character', this.textarea.selectionEnd - nbLineEnd - (this.textarea.selectionStart - nbLineStart) );range.select();};EA.prototype.tab_selection=function(){if(this.is_tabbing) return;this.is_tabbing=true;if( this.nav['isIE'] ) this.getIESelection();var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var insText=this.textarea.value.substring(start, end);var pos_start=start;var pos_end=end;if (insText.length==0){this.textarea.value=this.textarea.value.substr(0, start) + this.tabulation + this.textarea.value.substr(end);pos_start=start + this.tabulation.length;pos_end=pos_start;}\nelse{start=Math.max(0, this.textarea.value.substr(0, start).lastIndexOf(\"\\n\")+1);endText=this.textarea.value.substr(end);startText=this.textarea.value.substr(0, start);tmp=this.textarea.value.substring(start, end).split(\"\\n\");insText=this.tabulation+tmp.join(\"\\n\"+this.tabulation);this.textarea.value=startText + insText + endText;pos_start=start;pos_end=this.textarea.value.indexOf(\"\\n\", startText.length + insText.length);if(pos_end==-1) pos_end=this.textarea.value.length;}this.textarea.selectionStart=pos_start;this.textarea.selectionEnd=pos_end;if(this.nav['isIE']){this.setIESelection();setTimeout(\"eA.is_tabbing=false;\", 100);}\nelse this.is_tabbing=false;};EA.prototype.invert_tab_selection=function(){if(this.is_tabbing) return;this.is_tabbing=true;if(this.nav['isIE']) this.getIESelection();var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var insText=this.textarea.value.substring(start, end);var pos_start=start;var pos_end=end;if (insText.length==0){if(this.textarea.value.substring(start-this.tabulation.length, start)==this.tabulation){this.textarea.value=this.textarea.value.substr(0, start-this.tabulation.length) + this.textarea.value.substr(end);pos_start=Math.max(0, start-this.tabulation.length);pos_end=pos_start;}}\nelse{start=this.textarea.value.substr(0, start).lastIndexOf(\"\\n\")+1;endText=this.textarea.value.substr(end);startText=this.textarea.value.substr(0, start);tmp=this.textarea.value.substring(start, end).split(\"\\n\");insText=\"\";for(i=0;i<tmp.length;i++){for(j=0;j<this.tab_nb_char;j++){if(tmp[i].charAt(0)==\"\t\"){tmp[i]=tmp[i].substr(1);j=this.tab_nb_char;}\nelse if(tmp[i].charAt(0)==\" \") tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.length-1) insText+=\"\\n\";}this.textarea.value=startText + insText + endText;pos_start=start;pos_end=this.textarea.value.indexOf(\"\\n\", startText.length + insText.length);if(pos_end==-1) pos_end=this.textarea.value.length;}this.textarea.selectionStart=pos_start;this.textarea.selectionEnd=pos_end;if(this.nav['isIE']){this.setIESelection();setTimeout(\"eA.is_tabbing=false;\", 100);}\nelse this.is_tabbing=false;};EA.prototype.press_enter=function(){if(!this.smooth_selection) return false;if(this.nav['isIE']) this.getIESelection();var scrollTop=this.result.scrollTop;var scrollLeft=this.result.scrollLeft;var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var start_last_line=Math.max(0 , this.textarea.value.substring(0, start).lastIndexOf(\"\\n\") + 1 );var begin_line=this.textarea.value.substring(start_last_line, start).replace(/^([ \t]*).*/gm, \"$1\");if(begin_line==\"\\n\" || begin_line==\"\\r\" || begin_line.length==0) return false;if(this.nav['isIE'] || this.nav['isOpera']){begin_line=\"\\r\\n\"+ begin_line;}\nelse{begin_line=\"\\n\"+ begin_line;}this.textarea.value=this.textarea.value.substring(0, start) + begin_line + this.textarea.value.substring(end);this.area_select(start+ begin_line.length ,0);if(this.nav['isIE']){this.result.scrollTop=scrollTop;this.result.scrollLeft=scrollLeft;}return true;};EA.prototype.findEndBracket=function(infos, bracket){var start=infos[\"indexOfCursor\"];var normal_order=true;if(this.assocBracket[bracket]) endBracket=this.assocBracket[bracket];\nelse if(this.revertAssocBracket[bracket]){endBracket=this.revertAssocBracket[bracket];normal_order=false;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos[\"full_text\"].length && i>=0;){if(infos[\"full_text\"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos[\"full_text\"].charAt(i)==bracket) nbBracketOpen++;if(normal_order) i++;\nelse i--;}if(end==-1) return false;var endLastLine=infos[\"full_text\"].substr(0, end).lastIndexOf(\"\\n\");if(endLastLine==-1) line=1;\nelse line=infos[\"full_text\"].substr(0, endLastLine).split(\"\\n\").length + 1;var curPos=end - endLastLine;this.displayToCursorPosition(\"end_bracket\", line, curPos, infos[\"full_text\"].substring(endLastLine +1, end));return true;};EA.prototype.displayToCursorPosition=function(id, start_line, cur_pos, lineContent, no_real_move){var elem=document.getElementById(\"test_font_size\");var dest=document.getElementById(id);var postLeft=0;elem.innerHTML=\"<pre><span id='test_font_size_inner'>\"+lineContent.substr(0, cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span></pre>\";posLeft=45 + document.getElementById('test_font_size_inner').offsetWidth;var posTop=this.lineHeight * (start_line-1);if(no_real_move!=true){dest.style.top=posTop+\"px\";dest.style.left=posLeft+\"px\";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.prototype.area_select=function(start, length){this.textarea.focus();start=Math.max(0, Math.min(this.textarea.value.length, start));end=Math.max(start, Math.min(this.textarea.value.length, start+length));if(this.nav['isIE']){this.textarea.selectionStart=start;this.textarea.selectionEnd=end;this.setIESelection();}\nelse{if(this.nav['isOpera']){this.textarea.setSelectionRange(0, 0);}this.textarea.setSelectionRange(start, end);}this.check_line_selection();};EA.prototype.area_get_selection=function(){var text=\"\";if( document.selection ){var range=document.selection.createRange();text=range.text;}\nelse{text=this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd);}return text;}; EA.prototype.replace_tab=function(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi, eA.smartTab);};EA.prototype.smartTab=function(){val=\" \";return EA.prototype.smartTab.arguments[2] + EA.prototype.smartTab.arguments[3] + val.substr(0, eA.tab_nb_char - (EA.prototype.smartTab.arguments[3].length)%eA.tab_nb_char);};EA.prototype.show_waiting_screen=function(){width=this.editor_area.offsetWidth;height=this.editor_area.offsetHeight;if(this.nav['isGecko'] || this.nav['isOpera'] || this.nav['isIE']>=7){width-=2;height-=2;}this.processing_screen.style.display=\"block\";this.processing_screen.style.width=width+\"px\";this.processing_screen.style.height=height+\"px\";this.waiting_screen_displayed=true;};EA.prototype.hide_waiting_screen=function(){this.processing_screen.style.display=\"none\";this.waiting_screen_displayed=false;};EA.prototype.add_style=function(styles){if(styles.length>0){newcss=document.createElement(\"style\");newcss.type=\"text/css\";newcss.media=\"all\";document.getElementsByTagName(\"head\")[0].appendChild(newcss);cssrules=styles.split(\"}\");newcss=document.styleSheets[0];if(newcss.rules){for(i=cssrules.length-2;i>=0;i--){newrule=cssrules[i].split(\"{\");newcss.addRule(newrule[0],newrule[1])}}\nelse if(newcss.cssRules){for(i=cssrules.length-1;i>=0;i--){if(cssrules[i].indexOf(\"{\")!=-1){newcss.insertRule(cssrules[i]+\"}\",0);}}}}};EA.prototype.set_font=function(family, size){var elems=new Array(\"textarea\", \"content_highlight\", \"cursor_pos\", \"end_bracket\", \"selection_field\", \"line_number\");if(family && family!=\"\") this.settings[\"font_family\"]=family;if(size && size>0) this.settings[\"font_size\"]=size;if(this.nav['isOpera']) this.settings['font_family']=\"monospace\";var elem_font=document.getElementById(\"area_font_size\");if(elem_font){for(var i=0;i<elem_font.length;i++){if(elem_font.options[i].value && elem_font.options[i].value==this.settings[\"font_size\"]) elem_font.options[i].selected=true;}}document.getElementById(\"test_font_size\").style.fontFamily=\"\"+this.settings[\"font_family\"];document.getElementById(\"test_font_size\").style.fontSize=this.settings[\"font_size\"]+\"pt\";document.getElementById(\"test_font_size\").innerHTML=\"0\";this.lineHeight=document.getElementById(\"test_font_size\").offsetHeight;for(var i=0;i<elems.length;i++){var elem=document.getElementById(elems[i]);document.getElementById(elems[i]).style.fontFamily=this.settings[\"font_family\"];document.getElementById(elems[i]).style.fontSize=this.settings[\"font_size\"]+\"pt\";document.getElementById(elems[i]).style.lineHeight=this.lineHeight+\"px\";}if(this.nav['isOpera']){var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var parNod=this.textarea.parentNode, nxtSib=this.textarea.nextSibling;parNod.removeChild(this.textarea);parNod.insertBefore(this.textarea, nxtSib);this.area_select(start, end-start);}this.add_style(\"pre{font-family:\"+this.settings[\"font_family\"]+\"}\");this.last_line_selected=-1;this.last_selection=new Array();this.resync_highlight();};EA.prototype.change_font_size=function(){var size=document.getElementById(\"area_font_size\").value;if(size>0) this.set_font(\"\", size);};EA.prototype.open_inline_popup=function(popup_id){this.close_all_inline_popup();var popup=document.getElementById(popup_id);var editor=document.getElementById(\"editor\");for(var i=0;i<this.inlinePopup.length;i++){if(this.inlinePopup[i][\"popup_id\"]==popup_id){var icon=document.getElementById(this.inlinePopup[i][\"icon_id\"]);if(icon){this.switchClassSticky(icon, 'editAreaButtonSelected', true);break;}}}popup.style.height=\"auto\";popup.style.overflow=\"visible\";if(document.body.offsetHeight< popup.offsetHeight){popup.style.height=(document.body.offsetHeight-10)+\"px\";popup.style.overflow=\"auto\";}if(!popup.positionned){var new_left=editor.offsetWidth /2 - popup.offsetWidth /2;var new_top=editor.offsetHeight /2 - popup.offsetHeight /2;popup.style.left=new_left+\"px\";popup.style.top=new_top+\"px\";popup.positionned=true;}popup.style.visibility=\"visible\";};EA.prototype.close_inline_popup=function(popup_id){var popup=document.getElementById(popup_id);for(var i=0;i<this.inlinePopup.length;i++){if(this.inlinePopup[i][\"popup_id\"]==popup_id){var icon=document.getElementById(this.inlinePopup[i][\"icon_id\"]);if(icon){this.switchClassSticky(icon, 'editAreaButtonNormal', false);break;}}}popup.style.visibility=\"hidden\";};EA.prototype.close_all_inline_popup=function(e){for(var i=0;i<this.inlinePopup.length;i++){this.close_inline_popup(this.inlinePopup[i][\"popup_id\"]);}this.textarea.focus();};EA.prototype.show_help=function(){this.open_inline_popup(\"edit_area_help\");};EA.prototype.new_document=function(){this.textarea.value=\"\";this.area_select(0,0);};EA.prototype.get_all_toolbar_height=function(){var area=document.getElementById(\"editor\");var results=parent.getChildren(area, \"div\", \"class\", \"area_toolbar\", \"all\", \"0\");var height=0;for(var i=0;i<results.length;i++){height+=results[i].offsetHeight;}return height;};EA.prototype.go_to_line=function(line){if(!line){var icon=document.getElementById(\"go_to_line\");if(icon !=null){this.restoreClass(icon);this.switchClassSticky(icon, 'editAreaButtonSelected', true);}line=prompt(this.get_translation(\"go_to_line_prompt\"));if(icon !=null) this.switchClassSticky(icon, 'editAreaButtonNormal', false);}if(line && line!=null && line.search(/^[0-9]+$/)!=-1){var start=0;var lines=this.textarea.value.split(\"\\n\");if(line > lines.length) start=this.textarea.value.length;\nelse{for(var i=0;i<Math.min(line-1, lines.length);i++) start+=lines[i].length + 1;}this.area_select(start, 0);}};EA.prototype.change_smooth_selection_mode=function(setTo){if(this.do_highlight) return;if(setTo !=null){if(setTo ===false) this.smooth_selection=true;\nelse this.smooth_selection=false;}var icon=document.getElementById(\"change_smooth_selection\");this.textarea.focus();if(this.smooth_selection===true){this.switchClassSticky(icon, 'editAreaButtonNormal', false);this.smooth_selection=false;document.getElementById(\"selection_field\").style.display=\"none\";document.getElementById(\"cursor_pos\").style.display=\"none\";document.getElementById(\"end_bracket\").style.display=\"none\";}\nelse{this.switchClassSticky(icon, 'editAreaButtonSelected', false);this.smooth_selection=true;document.getElementById(\"selection_field\").style.display=\"block\";document.getElementById(\"cursor_pos\").style.display=\"block\";document.getElementById(\"end_bracket\").style.display=\"block\";}};EA.prototype.scroll_to_view=function(show){if(!this.smooth_selection) return;var zone=document.getElementById(\"result\");var cursor_pos_top=document.getElementById(\"cursor_pos\").cursor_top;if(show==\"bottom\") cursor_pos_top+=(this.last_selection[\"line_nb\"]-1)* this.lineHeight;var max_height_visible=zone.clientHeight + zone.scrollTop;var miss_top=cursor_pos_top + this.lineHeight - max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop + miss_top;}\nelse if( zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=document.getElementById(\"cursor_pos\").cursor_left;var max_width_visible=zone.clientWidth + zone.scrollLeft;var miss_left=cursor_pos_left + 10 - max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft + miss_left + 50;}\nelse if( zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if( zone.scrollLeft==45){zone.scrollLeft=0;}};EA.prototype.check_undo=function(only_once){if(!eAs[this.id]) return false;if(this.textareaFocused && eAs[this.id][\"displayed\"]==true){var text=this.textarea.value;if(this.previous.length<=1) this.switchClassSticky(document.getElementById(\"undo\"), 'editAreaButtonDisabled', true);if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1][\"text\"] !=text){this.previous.push({\"text\": text, \"selStart\": this.textarea.selectionStart, \"selEnd\": this.textarea.selectionEnd});if(this.previous.length > this.settings[\"max_undo\"]+1) this.previous.shift();}if(this.previous.length >=2) this.switchClassSticky(document.getElementById(\"undo\"), 'editAreaButtonNormal', false);}if(!only_once) setTimeout(\"eA.check_undo()\", 3000);};EA.prototype.undo=function(){if(this.previous.length > 0){if(this.nav['isIE']) this.getIESelection();this.next.push({\"text\": this.textarea.value, \"selStart\": this.textarea.selectionStart, \"selEnd\": this.textarea.selectionEnd});var prev=this.previous.pop();if(prev[\"text\"]==this.textarea.value && this.previous.length > 0) prev=this.previous.pop();this.textarea.value=prev[\"text\"];this.last_undo=prev[\"text\"];this.area_select(prev[\"selStart\"], prev[\"selEnd\"]-prev[\"selStart\"]);this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonNormal', false);this.resync_highlight(true);this.check_file_changes();}};EA.prototype.redo=function(){if(this.next.length > 0){var next=this.next.pop();this.previous.push(next);this.textarea.value=next[\"text\"];this.last_undo=next[\"text\"];this.area_select(next[\"selStart\"], next[\"selEnd\"]-next[\"selStart\"]);this.switchClassSticky(document.getElementById(\"undo\"), 'editAreaButtonNormal', false);this.resync_highlight(true);this.check_file_changes();}if( this.next.length==0) this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonDisabled', true);};EA.prototype.check_redo=function(){if(eA.next.length==0 || eA.textarea.value!=eA.last_undo){eA.next=new Array();eA.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonDisabled', true);}\nelse{this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonNormal', false);}};EA.prototype.switchClass=function(element, class_name, lock_state){var lockChanged=false;if (typeof(lock_state) !=\"undefined\" && element !=null){element.classLock=lock_state;lockChanged=true;}if (element !=null && (lockChanged || !element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.prototype.restoreAndSwitchClass=function(element, class_name){if (element !=null && !element.classLock){this.restoreClass(element);this.switchClass(element, class_name);}};EA.prototype.restoreClass=function(element){if (element !=null && element.oldClassName && !element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.prototype.setClassLock=function(element, lock_state){if (element !=null) element.classLock=lock_state;};EA.prototype.switchClassSticky=function(element, class_name, lock_state){var lockChanged=false;if (typeof(lock_state) !=\"undefined\" && element !=null){element.classLock=lock_state;lockChanged=true;}if (element !=null && (lockChanged || !element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.prototype.scroll_page=function(params){var dir=params[\"dir\"];var shift_pressed=params[\"shift\"];screen_height=document.getElementById(\"result\").clientHeight;var lines=this.textarea.value.split(\"\\n\");var new_pos=0;var length=0;var char_left=0;var line_nb=0;if(dir==\"up\"){var scroll_line=Math.ceil((screen_height -30)/this.lineHeight);if(this.last_selection[\"selec_direction\"]==\"up\"){for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]-scroll_line, lines.length);line_nb++){new_pos+=lines[line_nb].length + 1;}char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"]-1);if(shift_pressed) length=this.last_selection[\"selectionEnd\"]-new_pos-char_left;this.area_select(new_pos+char_left, length);view=\"top\";}\nelse{view=\"bottom\";for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]+this.last_selection[\"line_nb\"]-1-scroll_line, lines.length);line_nb++){new_pos+=lines[line_nb].length + 1;}char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"]-1);if(shift_pressed){start=Math.min(this.last_selection[\"selectionStart\"], new_pos+char_left);length=Math.max(new_pos+char_left, this.last_selection[\"selectionStart\"] )- start;if(new_pos+char_left < this.last_selection[\"selectionStart\"]) view=\"top\";}\nelse start=new_pos+char_left;this.area_select(start, length);}}\nelse{var scroll_line=Math.floor((screen_height-30)/this.lineHeight);if(this.last_selection[\"selec_direction\"]==\"down\"){view=\"bottom\";for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]+this.last_selection[\"line_nb\"]-2+scroll_line, lines.length);line_nb++){if(line_nb==this.last_selection[\"line_start\"]-1) char_left=this.last_selection[\"selectionStart\"] -new_pos;new_pos+=lines[line_nb].length + 1;}if(shift_pressed){length=Math.abs(this.last_selection[\"selectionStart\"]-new_pos);length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"]);this.area_select(Math.min(this.last_selection[\"selectionStart\"], new_pos), length);}\nelse{this.area_select(new_pos+char_left, 0);}}\nelse{view=\"top\";for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]+scroll_line-1, lines.length, lines.length);line_nb++){if(line_nb==this.last_selection[\"line_start\"]-1) char_left=this.last_selection[\"selectionStart\"] -new_pos;new_pos+=lines[line_nb].length + 1;}if(shift_pressed){length=Math.abs(this.last_selection[\"selectionEnd\"]-new_pos-char_left);length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"])- char_left-1;this.area_select(Math.min(this.last_selection[\"selectionEnd\"], new_pos+char_left), length);if(new_pos+char_left > this.last_selection[\"selectionEnd\"]) view=\"bottom\";}\nelse{this.area_select(new_pos+char_left, 0);}}}this.check_line_selection();this.scroll_to_view(view);};EA.prototype.start_resize=function(e){parent.eAL.resize[\"id\"]=eA.id;parent.eAL.resize[\"start_x\"]=(e)? e.pageX : event.x + document.body.scrollLeft;parent.eAL.resize[\"start_y\"]=(e)? e.pageY : event.y + document.body.scrollTop;if(eA.nav['isIE']){eA.textarea.focus();eA.getIESelection();}parent.eAL.resize[\"selectionStart\"]=eA.textarea.selectionStart;parent.eAL.resize[\"selectionEnd\"]=eA.textarea.selectionEnd;parent.eAL.start_resize_area();};EA.prototype.toggle_full_screen=function(to){if(typeof(to)==\"undefined\") to=!this.fullscreen['isFull'];var old=this.fullscreen['isFull'];this.fullscreen['isFull']=to;var icon=document.getElementById(\"fullscreen\");if(to && to!=old){var selStart=this.textarea.selectionStart;var selEnd=this.textarea.selectionEnd;var html=parent.document.getElementsByTagName(\"html\")[0];var frame=parent.document.getElementById(\"frame_\"+this.id);this.fullscreen['old_overflow']=parent.get_css_property(html, \"overflow\");this.fullscreen['old_height']=parent.get_css_property(html, \"height\");this.fullscreen['old_width']=parent.get_css_property(html, \"width\");this.fullscreen['old_scrollTop']=html.scrollTop;this.fullscreen['old_scrollLeft']=html.scrollLeft;this.fullscreen['old_zIndex']=parent.get_css_property(frame, \"z-index\");if(this.nav['isOpera']){html.style.height=\"100%\";html.style.width=\"100%\";}html.style.overflow=\"hidden\";html.scrollTop=0;html.scrollLeft=0;frame.style.position=\"absolute\";frame.style.width=html.clientWidth+\"px\";frame.style.height=html.clientHeight+\"px\";frame.style.display=\"block\";frame.style.zIndex=\"999999\";frame.style.top=\"0px\";frame.style.left=\"0px\";frame.style.top=\"-\"+parent.calculeOffsetTop(frame)+\"px\";frame.style.left=\"-\"+parent.calculeOffsetLeft(frame)+\"px\";this.switchClassSticky(icon, 'editAreaButtonSelected', false);this.fullscreen['allow_resize']=this.resize_allowed;this.allow_resize(false);if(this.nav['isFirefox']){parent.eAL.execCommand(this.id, \"update_size();\");this.area_select(selStart, selEnd-selStart);this.scroll_to_view();this.focus();}\nelse{setTimeout(\"parent.eAL.execCommand('\"+ this.id +\"', 'update_size();');eA.focus();\", 10);}}\nelse if(to!=old){var selStart=this.textarea.selectionStart;var selEnd=this.textarea.selectionEnd;var frame=parent.document.getElementById(\"frame_\"+this.id);frame.style.position=\"static\";frame.style.zIndex=this.fullscreen['old_zIndex'];var html=parent.document.getElementsByTagName(\"html\")[0];if(this.nav['isOpera']){html.style.height=\"auto\";html.style.width=\"auto\";html.style.overflow=\"auto\";}\nelse if(this.nav['isIE'] && parent!=top){html.style.overflow=\"auto\";}\nelse html.style.overflow=this.fullscreen['old_overflow'];html.scrollTop=this.fullscreen['old_scrollTop'];html.scrollTop=this.fullscreen['old_scrollLeft'];parent.eAL.hide(this.id);parent.eAL.show(this.id);this.switchClassSticky(icon, 'editAreaButtonNormal', false);if(this.fullscreen['allow_resize']) this.allow_resize(this.fullscreen['allow_resize']);if(this.nav['isFirefox']){this.area_select(selStart, selEnd-selStart);setTimeout(\"eA.scroll_to_view();\", 10);}}};EA.prototype.allow_resize=function(allow){var resize=document.getElementById(\"resize_area\");if(allow){resize.style.visibility=\"visible\";parent.eAL.add_event(resize, \"mouseup\", eA.start_resize);}\nelse{resize.style.visibility=\"hidden\";parent.eAL.remove_event(resize, \"mouseup\", eA.start_resize);}this.resize_allowed=allow;};EA.prototype.change_syntax=function(new_syntax, is_waiting){if(new_syntax==this.settings['syntax']) return true;var founded=false;for(var i=0;i<this.syntax_list.length;i++){if(this.syntax_list[i]==new_syntax) founded=true;}if(founded==true){if(!parent.eAL.load_syntax[new_syntax]){if(!is_waiting) parent.eAL.load_script(parent.eAL.baseURL + \"reg_syntax/\" + new_syntax + \".js\");setTimeout(\"eA.change_syntax('\"+ new_syntax +\"', true);\", 100);this.show_waiting_screen();}\nelse{if(!this.allready_used_syntax[new_syntax]){parent.eAL.init_syntax_regexp();this.add_style(parent.eAL.syntax[new_syntax][\"styles\"]);this.allready_used_syntax[new_syntax]=true;}var sel=document.getElementById(\"syntax_selection\");if(sel && sel.value!=new_syntax){for(var i=0;i<sel.length;i++){if(sel.options[i].value && sel.options[i].value==new_syntax) sel.options[i].selected=true;}}this.settings['syntax']=new_syntax;this.resync_highlight(true);this.hide_waiting_screen();return true;}}return false;};EA.prototype.set_editable=function(is_editable){if(is_editable){document.body.className=\"\";this.textarea.readOnly=false;this.is_editable=true;}\nelse{document.body.className=\"non_editable\";this.textarea.readOnly=true;this.is_editable=false;}if(eAs[this.id][\"displayed\"]==true) this.update_size();};EA.prototype.open_file=function(settings){if(settings['id']!=\"undefined\"){var id=settings['id'];var new_file=new Object();new_file['id']=id;new_file['title']=id;new_file['text']=\"\";new_file['last_selection']=\"\";new_file['last_text_to_highlight']=\"\";new_file['last_hightlighted_text']=\"\";new_file['previous']=new Array();new_file['next']=new Array();new_file['last_undo']=\"\";new_file['smooth_selection']=this.settings['smooth_selection'];new_file['do_highlight']=this.settings['start_highlight'];new_file['syntax']=this.settings['syntax'];new_file['scroll_top']=0;new_file['scroll_left']=0;new_file['selection_start']=0;new_file['selection_end']=0;new_file['edited']=false;new_file['font_size']=this.settings[\"font_size\"];new_file['font_family']=this.settings[\"font_family\"];new_file['toolbar']={'links':{}, 'selects': {}};new_file['compare_edited_text']=new_file['text'];this.files[id]=new_file;this.update_file(id, settings);this.files[id]['compare_edited_text']=this.files[id]['text'];var html_id='tab_file_'+encodeURIComponent(id);this.filesIdAssoc[html_id]=id;this.files[id]['html_id']=html_id;if(!document.getElementById(this.files[id]['html_id']) && id!=\"\"){this.tab_browsing_area.style.display=\"block\";var elem=document.createElement('li');elem.id=this.files[id]['html_id'];var close=\"<img src=\\\"\"+ parent.eAL.baseURL +\"images/close.gif\\\" title=\\\"\"+ this.get_translation('close_tab', 'word') +\"\\\" onclick=\\\"eA.execCommand('close_file', eA.filesIdAssoc['\"+ html_id +\"']);return false;\\\" class=\\\"hidden\\\" onmouseover=\\\"this.className=''\\\" onmouseout=\\\"this.className='hidden'\\\" />\";elem.innerHTML=\"<a onclick=\\\"javascript:eA.execCommand('switch_to_file', eA.filesIdAssoc['\"+ html_id +\"']);\\\" selec=\\\"none\\\"><b><span><strong class=\\\"edited\\\">*</strong>\"+ this.files[id]['title'] + close +\"</span></b></a>\";document.getElementById('tab_browsing_list').appendChild(elem);var elem=document.createElement('text');this.update_size();}if(id!=\"\") this.execCommand('file_open', this.files[id]);this.switch_to_file(id, true);return true;}\nelse return false;};EA.prototype.close_file=function(id){if(this.files[id]){this.save_file(id);if(this.execCommand('file_close', this.files[id])!==false){var li=document.getElementById(this.files[id]['html_id']);li.parentNode.removeChild(li);if(id==this.curr_file){var next_file=\"\";var is_next=false;for(var i in this.files){if(is_next){next_file=i;break;}\nelse if(i==id) is_next=true;\nelse next_file=i;}this.switch_to_file(next_file);}delete (this.files[id]);this.update_size();}}};EA.prototype.save_file=function(id){if(this.files[id]){var save=this.files[id];save['last_selection']=this.last_selection;save['last_text_to_highlight']=this.last_text_to_highlight;save['last_hightlighted_text']=this.last_hightlighted_text;save['previous']=this.previous;save['next']=this.next;save['last_undo']=this.last_undo;save['smooth_selection']=this.smooth_selection;save['do_highlight']=this.do_highlight;save['syntax']=this.settings['syntax'];save['text']=this.textarea.value;save['scroll_top']=this.result.scrollTop;save['scroll_left']=this.result.scrollLeft;save['selection_start']=this.last_selection[\"selectionStart\"];save['selection_end']=this.last_selection[\"selectionEnd\"];save['font_size']=this.settings[\"font_size\"];save['font_family']=this.settings[\"font_family\"];save['toolbar']={'links':{}, 'selects': {}};var links=document.getElementById(\"toolbar_1\").getElementsByTagName(\"a\");for(var i=0;i<links.length;i++){if(links[i].getAttribute('fileSpecific')=='yes'){var save_butt=new Object();var img=links[i].getElementsByTagName('img')[0];save_butt['classLock']=img.classLock;save_butt['className']=img.className;save_butt['oldClassName']=img.oldClassName;save['toolbar']['links'][links[i].id]=save_butt;}}var selects=document.getElementById(\"toolbar_1\").getElementsByTagName(\"select\");for(var i=0;i<selects.length;i++){if(selects[i].getAttribute('fileSpecific')=='yes'){save['toolbar']['selects'][selects[i].id]=selects[i].value;}}this.files[id]=save;return save;}\nelse return false;};EA.prototype.update_file=function(id, new_values){for(var i in new_values){this.files[id][i]=new_values[i];}};EA.prototype.display_file=function(id){if(id==''){this.textarea.readOnly=true;this.tab_browsing_area.style.display=\"none\";document.getElementById(\"no_file_selected\").style.display=\"block\";this.result.className=\"empty\";if(!this.files['']) this.open_file({id: ''});}\nelse{this.result.className=\"\";this.textarea.readOnly=!this.is_editable;document.getElementById(\"no_file_selected\").style.display=\"none\";this.tab_browsing_area.style.display=\"block\";}this.check_redo(true);this.check_undo(true);this.curr_file=id;var lis=this.tab_browsing_area.getElementsByTagName('li');for(var i=0;i<lis.length;i++){if(lis[i].id==this.files[id]['html_id']) lis[i].className='selected';\nelse lis[i].className='';}var new_file=this.files[id];this.textarea.value=new_file['text'];this.set_font(new_file['font_family'], new_file['font_size']);this.area_select(new_file['last_selection']['selection_start'], new_file['last_selection']['selection_end'] - new_file['last_selection']['selection_start']);this.manage_size(true);this.result.scrollTop=new_file['scroll_top'];this.result.scrollLeft=new_file['scroll_left'];this.previous=new_file['previous'];this.next=new_file['next'];this.last_undo=new_file['last_undo'];this.check_redo(true);this.check_undo(true);this.execCommand(\"change_highlight\", new_file['do_highlight']);this.execCommand(\"change_syntax\", new_file['syntax']);this.execCommand(\"change_smooth_selection_mode\", new_file['smooth_selection']);var links=new_file['toolbar']['links'];for(var i in links){if(img=document.getElementById(i).getElementsByTagName('img')[0]){var save_butt=new Object();img.classLock=links[i]['classLock'];img.className=links[i]['className'];img.oldClassName=links[i]['oldClassName'];}}var selects=new_file['toolbar']['selects'];for(var i in selects){var options=document.getElementById(i).options;for(var j=0;j<options.length;j++){if(options[j].value==selects[i]) document.getElementById(i).options[j].selected=true;}}};EA.prototype.switch_to_file=function(file_to_show, force_refresh){if(file_to_show!=this.curr_file || force_refresh){this.save_file(this.curr_file);if(this.curr_file!='') this.execCommand('file_switch_off', this.files[this.curr_file]);this.display_file(file_to_show);if(file_to_show!='') this.execCommand('file_switch_on', this.files[file_to_show]);}};EA.prototype.get_file=function(id){if(id==this.curr_file) this.save_file(id);return this.files[id];};EA.prototype.get_all_files=function(){tmp_files=this.files;this.save_file(this.curr_file);if(tmp_files['']) delete(this.files['']);return tmp_files;};EA.prototype.check_file_changes=function(){var id=this.curr_file;if(this.files[id] && this.files[id]['compare_edited_text']!=undefined){if(this.files[id]['compare_edited_text'].length==this.textarea.value.length && this.files[id]['compare_edited_text']==this.textarea.value){if(this.files[id]['edited']!=false) this.set_file_edited_mode(id, false);}\nelse{if(this.files[id]['edited']!=true) this.set_file_edited_mode(id, true);}}};EA.prototype.set_file_edited_mode=function(id, to){if(this.files[id] && document.getElementById(this.files[id]['html_id'])){var link=document.getElementById(this.files[id]['html_id']).getElementsByTagName('a')[0];if(to==true){link.className='edited';}\nelse{link.className='';if(id==this.curr_file) text=this.textarea.value;\nelse text=this.files[id]['text'];this.files[id]['compare_edited_text']=text;}this.files[id]['edited']=to;}};var clavier_cds=new Object(146);clavier_cds[8]=\"Retour arriere\";clavier_cds[9]=\"Tabulation\";clavier_cds[12]=\"Milieu (pave numerique)\";clavier_cds[13]=\"Entrer\";clavier_cds[16]=\"Shift\";clavier_cds[17]=\"Ctrl\";clavier_cds[18]=\"Alt\";clavier_cds[19]=\"Pause\";clavier_cds[20]=\"Verr Maj\";clavier_cds[27]=\"Esc\";clavier_cds[32]=\"Espace\";clavier_cds[33]=\"Page up\";clavier_cds[34]=\"Page down\";clavier_cds[35]=\"End\";clavier_cds[36]=\"Begin\";clavier_cds[37]=\"Fleche gauche\";clavier_cds[38]=\"Fleche haut\";clavier_cds[39]=\"Fleche droite\";clavier_cds[40]=\"Fleche bas\";clavier_cds[44]=\"Impr ecran\";clavier_cds[45]=\"Inser\";clavier_cds[46]=\"Suppr\";clavier_cds[91]=\"Menu Demarrer Windows / touche pomme Mac\";clavier_cds[92]=\"Menu Demarrer Windows\";clavier_cds[93]=\"Menu contextuel Windows\";clavier_cds[112]=\"F1\";clavier_cds[113]=\"F2\";clavier_cds[114]=\"F3\";clavier_cds[115]=\"F4\";clavier_cds[116]=\"F5\";clavier_cds[117]=\"F6\";clavier_cds[118]=\"F7\";clavier_cds[119]=\"F8\";clavier_cds[120]=\"F9\";clavier_cds[121]=\"F10\";clavier_cds[122]=\"F11\";clavier_cds[123]=\"F12\";clavier_cds[144]=\"Verr Num\";clavier_cds[145]=\"Arret defil\";function keyDown(e){if(!e){e=event;}for(var i in eA.plugins){if(typeof(eA.plugins[i].onkeydown)==\"function\"){if(eA.plugins[i].onkeydown(e)===false){if(eA.nav['isIE']) e.keyCode=0;return false;}}}var target_id=(e.target || e.srcElement).id;var use=false;if (clavier_cds[e.keyCode]) letter=clavier_cds[e.keyCode];\nelse letter=String.fromCharCode(e.keyCode);var low_letter=letter.toLowerCase();if(letter==\"Page up\" && !eA.nav['isOpera']){eA.execCommand(\"scroll_page\", {\"dir\": \"up\", \"shift\": ShiftPressed(e)});use=true;}\nelse if(letter==\"Page down\" && !eA.nav['isOpera']){eA.execCommand(\"scroll_page\", {\"dir\": \"down\", \"shift\": ShiftPressed(e)});use=true;}\nelse if(eA.is_editable==false){return true;}\nelse if(letter==\"Tabulation\" && target_id==\"textarea\" && !CtrlPressed(e) && !AltPressed(e)){if(ShiftPressed(e)) eA.execCommand(\"invert_tab_selection\");\nelse eA.execCommand(\"tab_selection\");use=true;if(eA.nav['isOpera'] || (eA.nav['isFirefox'] && eA.nav['isMacOS']) ) setTimeout(\"eA.execCommand('focus');\", 1);}\nelse if(letter==\"Entrer\" && target_id==\"textarea\"){if(eA.press_enter()) use=true;}\nelse if(letter==\"Entrer\" && target_id==\"area_search\"){eA.execCommand(\"area_search\");use=true;}\nelse if(letter==\"Esc\"){eA.execCommand(\"close_all_inline_popup\", e);use=true;}\nelse if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){switch(low_letter){case \"f\": eA.execCommand(\"area_search\");use=true;break;case \"r\": eA.execCommand(\"area_replace\");use=true;break;case \"q\": eA.execCommand(\"close_all_inline_popup\", e);use=true;break;case \"h\": eA.execCommand(\"change_highlight\");use=true;break;case \"g\": setTimeout(\"eA.execCommand('go_to_line');\", 5);use=true;break;case \"e\": eA.execCommand(\"show_help\");use=true;break;case \"z\": use=true;eA.execCommand(\"undo\");break;case \"y\": use=true;eA.execCommand(\"redo\");break;default: break;}}if(eA.next.length > 0){setTimeout(\"eA.check_redo();\", 10);}setTimeout(\"eA.check_file_changes();\", 10);if(use){if(eA.nav['isIE']) e.keyCode=0;return false;}return true;};function AltPressed(e){if (window.event){return (window.event.altKey);}\nelse{if(e.modifiers) return (e.altKey || (e.modifiers % 2));\nelse return e.altKey;}};function CtrlPressed(e){if (window.event){return (window.event.ctrlKey);}\nelse{return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));}};function ShiftPressed(e){if (window.event){return (window.event.shiftKey);}\nelse{return (e.shiftKey || (e.modifiers>3));}}; EA.prototype.show_search=function(){if(document.getElementById(\"area_search_replace\").style.visibility==\"visible\"){this.hidden_search();}\nelse{this.open_inline_popup(\"area_search_replace\");var text=this.area_get_selection();var search=text.split(\"\\n\")[0];document.getElementById(\"area_search\").value=search;document.getElementById(\"area_search\").focus();}};EA.prototype.hidden_search=function(){this.close_inline_popup(\"area_search_replace\");};EA.prototype.area_search=function(mode){if(!mode) mode=\"search\";document.getElementById(\"area_search_msg\").innerHTML=\"\";var search=document.getElementById(\"area_search\").value;this.textarea.focus();this.textarea.textareaFocused=true;var infos=this.get_selection_infos();var start=infos[\"selectionStart\"];var pos=-1;var pos_begin=-1;var length=search.length;if(document.getElementById(\"area_search_replace\").style.visibility!=\"visible\"){this.show_search();return;}if(search.length==0){document.getElementById(\"area_search_msg\").innerHTML=this.get_translation(\"search_field_empty\");return;}if(mode!=\"replace\" ){if(document.getElementById(\"area_search_reg_exp\").checked) start++;\nelse start+=search.length;}if(document.getElementById(\"area_search_reg_exp\").checked){var opt=\"m\";if(!document.getElementById(\"area_search_match_case\").checked) opt+=\"i\";var reg=new RegExp(search, opt);pos=infos[\"full_text\"].substr(start).search(reg);pos_begin=infos[\"full_text\"].search(reg);if(pos!=-1){pos+=start;length=infos[\"full_text\"].substr(start).match(reg)[0].length;}\nelse if(pos_begin!=-1){length=infos[\"full_text\"].match(reg)[0].length;}}\nelse{if(document.getElementById(\"area_search_match_case\").checked){pos=infos[\"full_text\"].indexOf(search, start);pos_begin=infos[\"full_text\"].indexOf(search);}\nelse{pos=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase(), start);pos_begin=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase());}}if(pos==-1 && pos_begin==-1){document.getElementById(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+this.get_translation(\"not_found\");return;}\nelse if(pos==-1 && pos_begin !=-1){begin=pos_begin;document.getElementById(\"area_search_msg\").innerHTML=this.get_translation(\"restart_search_at_begin\");}\nelse begin=pos;if(mode==\"replace\" && pos==infos[\"indexOfCursor\"]){var replace=document.getElementById(\"area_replace\").value;var new_text=\"\";if(document.getElementById(\"area_search_reg_exp\").checked){var opt=\"m\";if(!document.getElementById(\"area_search_match_case\").checked) opt+=\"i\";var reg=new RegExp(search, opt);new_text=infos[\"full_text\"].substr(0, begin) + infos[\"full_text\"].substr(start).replace(reg, replace);}\nelse{new_text=infos[\"full_text\"].substr(0, begin) + replace + infos[\"full_text\"].substr(begin + length);}this.textarea.value=new_text;this.area_select(begin, length);this.area_search();}\nelse this.area_select(begin, length);};EA.prototype.area_replace=function(){this.area_search(\"replace\");};EA.prototype.area_replace_all=function(){var base_text=this.textarea.value;var search=document.getElementById(\"area_search\").value;var replace=document.getElementById(\"area_replace\").value;if(search.length==0){document.getElementById(\"area_search_msg\").innerHTML=this.get_translation(\"search_field_empty\");return;}var new_text=\"\";var nb_change=0;if(document.getElementById(\"area_search_reg_exp\").checked){var opt=\"mg\";if(!document.getElementById(\"area_search_match_case\").checked) opt+=\"i\";var reg=new RegExp(search, opt);nb_change=infos[\"full_text\"].match(reg).length;new_text=infos[\"full_text\"].replace(reg, replace);}\nelse{if(document.getElementById(\"area_search_match_case\").checked){var tmp_tab=base_text.split(search);nb_change=tmp_tab.length -1;new_text=tmp_tab.join(replace);}\nelse{var lower_value=base_text.toLowerCase();var lower_search=search.toLowerCase();var start=0;var pos=lower_value.indexOf(lower_search);while(pos!=-1){nb_change++;new_text+=this.textarea.value.substring(start , pos)+replace;start=pos+ search.length;pos=lower_value.indexOf(lower_search, pos+1);}new_text+=this.textarea.value.substring(start);}}if(new_text==base_text){document.getElementById(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+this.get_translation(\"not_found\");}\nelse{this.textarea.value=new_text;document.getElementById(\"area_search_msg\").innerHTML=\"<strong>\"+nb_change+\"</strong> \"+this.get_translation(\"occurrence_replaced\");setTimeout(\"eA.textarea.focus();eA.textarea.textareaFocused=true;\", 100);}}; EA.prototype.change_highlight=function(change_to){if(this.settings[\"syntax\"].length==0 && change_to==false){this.switchClassSticky(document.getElementById(\"highlight\"), 'editAreaButtonDisabled', true);this.switchClassSticky(document.getElementById(\"reset_highlight\"), 'editAreaButtonDisabled', true);return false;}if(this.do_highlight==change_to) return false;if(this.nav['isIE']) this.getIESelection();var pos_start=this.textarea.selectionStart;var pos_end=this.textarea.selectionEnd;if(this.do_highlight===true || change_to==false) this.disable_highlight();\nelse this.enable_highlight();this.textarea.focus();this.textarea.selectionStart=pos_start;this.textarea.selectionEnd=pos_end;if(this.nav['isIE']) this.setIESelection();};EA.prototype.disable_highlight=function(displayOnly){document.getElementById(\"selection_field\").innerHTML=\"\";this.content_highlight.style.visibility=\"hidden\";var new_Obj=this.content_highlight.cloneNode(false);new_Obj.innerHTML=\"\";this.content_highlight.parentNode.insertBefore(new_Obj, this.content_highlight);this.content_highlight.parentNode.removeChild(this.content_highlight);this.content_highlight=new_Obj;var old_class=parent.getAttribute(this.textarea,\"class\");if(old_class){var new_class=old_class.replace(\"hidden\",\"\");parent.setAttribute(this.textarea, \"class\", new_class);}this.textarea.style.backgroundColor=\"transparent\";this.switchClassSticky(document.getElementById(\"highlight\"), 'editAreaButtonNormal', true);this.switchClassSticky(document.getElementById(\"reset_highlight\"), 'editAreaButtonDisabled', true);this.do_highlight=false;this.switchClassSticky(document.getElementById(\"change_smooth_selection\"), 'editAreaButtonSelected', true);if(typeof(this.smooth_selection_before_highlight)!=\"undefined\" && this.smooth_selection_before_highlight===false){this.change_smooth_selection_mode(false);}};EA.prototype.enable_highlight=function(){this.show_waiting_screen();this.content_highlight.style.visibility=\"visible\";var new_class=parent.getAttribute(this.textarea,\"class\")+\" hidden\";parent.setAttribute(this.textarea, \"class\", new_class);if(this.nav['isIE']) this.textarea.style.backgroundColor=\"#FFFFFF\";this.switchClassSticky(document.getElementById(\"highlight\"), 'editAreaButtonSelected', false);this.switchClassSticky(document.getElementById(\"reset_highlight\"), 'editAreaButtonNormal', false);this.smooth_selection_before_highlight=this.smooth_selection;if(!this.smooth_selection) this.change_smooth_selection_mode(true);this.switchClassSticky(document.getElementById(\"change_smooth_selection\"), 'editAreaButtonDisabled', true);this.do_highlight=true;this.resync_highlight();this.hide_waiting_screen();};EA.prototype.maj_highlight=function(infos){if(this.last_highlight_base_text==infos[\"full_text\"] && this.resync_highlight!==true) return;if(infos[\"full_text\"].indexOf(\"\\r\")!=-1) text_to_highlight=infos[\"full_text\"].replace(/\\r/g, \"\");\nelse text_to_highlight=infos[\"full_text\"];var start_line_pb=-1;var end_line_pb=-1;var stay_begin=\"\";var stay_end=\"\";var debug_opti=\"\";var date=new Date();var tps_start=date.getTime();var tps_middle_opti=date.getTime();if(this.reload_highlight===true){this.reload_highlight=false;}\nelse if(text_to_highlight.length==0){text_to_highlight=\"\\n \";}\nelse{var base_step=200;var cpt=0;var end=Math.min(text_to_highlight.length, this.last_text_to_highlight.length);var step=base_step;while(cpt<end && step>=1){if(this.last_text_to_highlight.substr(cpt, step)==text_to_highlight.substr(cpt, step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}var pos_start_change=cpt;var line_start_change=text_to_highlight.substr(0, pos_start_change).split(\"\\n\").length -1;cpt_last=this.last_text_to_highlight.length;cpt=text_to_highlight.length;step=base_step;while(cpt>=0 && cpt_last>=0 && step>=1){if(this.last_text_to_highlight.substr(cpt_last-step, step)==text_to_highlight.substr(cpt-step, step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}var pos_new_end_change=cpt;var pos_last_end_change=cpt_last;if(pos_new_end_change<=pos_start_change){if(this.last_text_to_highlight.length < text_to_highlight.length){pos_new_end_change=pos_start_change + text_to_highlight.length - this.last_text_to_highlight.length;pos_last_end_change=pos_start_change;}\nelse{pos_last_end_change=pos_start_change + this.last_text_to_highlight.length - text_to_highlight.length;pos_new_end_change=pos_start_change;}}var change_new_text=text_to_highlight.substring(pos_start_change, pos_new_end_change);var change_last_text=this.last_text_to_highlight.substring(pos_start_change, pos_last_end_change);var line_new_end_change=text_to_highlight.substr(0, pos_new_end_change).split(\"\\n\").length -1;var line_last_end_change=this.last_text_to_highlight.substr(0, pos_last_end_change).split(\"\\n\").length -1;var change_new_text_line=text_to_highlight.split(\"\\n\").slice(line_start_change, line_new_end_change+1).join(\"\\n\");var change_last_text_line=this.last_text_to_highlight.split(\"\\n\").slice(line_start_change, line_last_end_change+1).join(\"\\n\");var trace_new=this.get_syntax_trace(change_new_text_line);var trace_last=this.get_syntax_trace(change_last_text_line);if(trace_new==trace_last){date=new Date();tps_middle_opti=date.getTime();stay_begin=this.last_hightlighted_text.split(\"\\n\").slice(0, line_start_change).join(\"\\n\");if(line_start_change>0) stay_begin+=\"\\n\";stay_end=this.last_hightlighted_text.split(\"\\n\").slice(line_last_end_change+1).join(\"\\n\");if(stay_end.length>0) stay_end=\"\\n\"+stay_end;if(stay_begin.length==0 && pos_last_end_change==-1) change_new_text_line+=\"\\n\";text_to_highlight=change_new_text_line;}if(this.settings[\"debug\"]){debug_opti=(trace_new==trace_last)?\"Optimisation\": \"No optimisation\";debug_opti+=\" start: \"+pos_start_change +\"(\"+line_start_change+\")\";debug_opti+=\" end_new: \"+ pos_new_end_change+\"(\"+line_new_end_change+\")\";debug_opti+=\" end_last: \"+ pos_last_end_change+\"(\"+line_last_end_change+\")\";debug_opti+=\"\\nchanged_text: \"+change_new_text+\" => trace: \"+trace_new;debug_opti+=\"\\nchanged_last_text: \"+change_last_text+\" => trace: \"+trace_last;debug_opti+=\"\\nchanged_line: \"+change_new_text_line;debug_opti+=\"\\nlast_changed_line: \"+change_last_text_line;debug_opti+=\"\\nstay_begin: \"+ stay_begin.slice(-200);debug_opti+=\"\\nstay_end: \"+ stay_end;debug_opti+=\"\\n\";}}date=new Date();tps_end_opti=date.getTime();var updated_highlight=this.colorize_text(text_to_highlight);date=new Date();tps2=date.getTime();var hightlighted_text=stay_begin + updated_highlight + stay_end;date=new Date();inner1=date.getTime();var new_Obj=this.content_highlight.cloneNode(false);if(this.nav['isIE'] || this.nav['isOpera']) new_Obj.innerHTML=\"<pre><span class='\"+ this.settings[\"syntax\"] +\"'>\" + hightlighted_text.replace(\"\\n\", \"<br/>\") + \"</span></pre>\";\nelse new_Obj.innerHTML=\"<span class='\"+ this.settings[\"syntax\"] +\"'>\"+ hightlighted_text +\"</span>\";this.content_highlight.parentNode.insertBefore(new_Obj, this.content_highlight);this.content_highlight.parentNode.removeChild(this.content_highlight);this.content_highlight=new_Obj;if(infos[\"full_text\"].indexOf(\"\\r\")!=-1) this.last_text_to_highlight=infos[\"full_text\"].replace(/\\r/g, \"\");\nelse this.last_text_to_highlight=infos[\"full_text\"];this.last_hightlighted_text=hightlighted_text;date=new Date();tps3=date.getTime();if(this.settings[\"debug\"]){tot1=tps_end_opti-tps_start;tot_middle=tps_end_opti- tps_middle_opti;tot2=tps2-tps_end_opti;tps_join=inner1-tps2;tps_td2=tps3-inner1;this.debug.value=\"Tps optimisation \"+tot1+\" (second part: \"+tot_middle+\") | tps reg exp: \"+tot2+\" | tps join: \"+tps_join;this.debug.value+=\" | tps update highlight content: \"+tps_td2+\"(\"+tps3+\")\\n\";this.debug.value+=debug_opti;}};EA.prototype.resync_highlight=function(reload_now){this.reload_highlight=true;this.last_highlight_base_text=\"\";this.focus();if(reload_now) this.check_line_selection(false);}; EA.prototype.comment_or_quote=function(){var new_class=\"\";var close_tag=\"\";for(var i in parent.eAL.syntax[eA.current_code_lang][\"quotes\"]){if(EA.prototype.comment_or_quote.arguments[0].indexOf(i)==0){new_class=\"quotesmarks\";close_tag=parent.eAL.syntax[eA.current_code_lang][\"quotes\"][i];}}if(new_class.length==0){for(var i in parent.eAL.syntax[eA.current_code_lang][\"comments\"]){if(EA.prototype.comment_or_quote.arguments[0].indexOf(i)==0){new_class=\"comments\";close_tag=parent.eAL.syntax[eA.current_code_lang][\"comments\"][i];}}}if(close_tag==\"\\n\"){return \"µ__\"+ new_class +\"__µ\"+EA.prototype.comment_or_quote.arguments[0].replace(/(\\r?\\n)?$/m, \"µ_END_µ$1\");}\nelse{reg=new RegExp(parent.eAL.get_escaped_regexp(close_tag)+\"$\", \"m\");if(EA.prototype.comment_or_quote.arguments[0].search(reg)!=-1) return \"µ__\"+ new_class +\"__µ\"+EA.prototype.comment_or_quote.arguments[0]+\"µ_END_µ\";\nelse return \"µ__\"+ new_class +\"__µ\"+EA.prototype.comment_or_quote.arguments[0];}};EA.prototype.get_syntax_trace=function(text){if(this.settings[\"syntax\"].length>0 && parent.eAL.syntax[this.settings[\"syntax\"]][\"syntax_trace_regexp\"]) return text.replace(parent.eAL.syntax[this.settings[\"syntax\"]][\"syntax_trace_regexp\"], \"$3\");};EA.prototype.colorize_text=function(text){text=\" \"+text;if(this.settings[\"syntax\"].length>0) text=this.apply_syntax(text, this.settings[\"syntax\"]);text=text.substr(1);text=text.replace(/&/g,\"&amp;\");text=text.replace(/</g,\"&lt;\");text=text.replace(/>/g,\"&gt;\");text=text.replace(/µ_END_µ/g,\"</span>\");text=text.replace(/µ__([a-zA-Z0-9]+)__µ/g,\"<span class='$1'>\");return text;};EA.prototype.apply_syntax=function(text, lang){this.current_code_lang=lang;if(!parent.eAL.syntax[lang]) return text;if(parent.eAL.syntax[lang][\"custom_regexp\"]['before']){for( var i in parent.eAL.syntax[lang][\"custom_regexp\"]['before']){var convert=\"$1µ__\"+ parent.eAL.syntax[lang][\"custom_regexp\"]['before'][i]['class'] +\"__µ$2µ_END_µ$3\";text=text.replace(parent.eAL.syntax[lang][\"custom_regexp\"]['before'][i]['regexp'], convert);}}if(parent.eAL.syntax[lang][\"comment_or_quote_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"comment_or_quote_reg_exp\"], this.comment_or_quote);}if(parent.eAL.syntax[lang][\"keywords_reg_exp\"]){for(var i in parent.eAL.syntax[lang][\"keywords_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"keywords_reg_exp\"][i], 'µ__'+i+'__µ$2µ_END_µ');}}if(parent.eAL.syntax[lang][\"delimiters_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"delimiters_reg_exp\"], 'µ__delimiters__µ$1µ_END_µ');}if(parent.eAL.syntax[lang][\"operators_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"operators_reg_exp\"], 'µ__operators__µ$1µ_END_µ');}if(parent.eAL.syntax[lang][\"custom_regexp\"]['after']){for( var i in parent.eAL.syntax[lang][\"custom_regexp\"]['after']){var convert=\"$1µ__\"+ parent.eAL.syntax[lang][\"custom_regexp\"]['after'][i]['class'] +\"__µ$2µ_END_µ$3\";text=text.replace(parent.eAL.syntax[lang][\"custom_regexp\"]['after'][i]['regexp'], convert);}}return text;};var editArea= eA;EditArea=EA;</script>";
+editAreaLoader.template= "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>EditArea</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> [__CSSRULES__] [__JSCODE__] </head> <body> <div id='editor'> <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div> <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div> <div id='result'> <div id='no_file_selected'></div> <div id='container'> <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div> <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div> <div id='selection_field'></div> <div id='line_number' selec='none'></div> <div id='content_highlight'></div> <div id='test_font_size'></div> <textarea id='textarea' wrap='off' onchange='editArea.execCommand(\"onchange\");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'> </textarea> </div> </div> <div class='area_toolbar' id='toolbar_2'> <table class='statusbar' cellspacing='0' cellpadding='0'> <tr> <td class='total' selec='none'>{$position}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span> </td> <td class='total' selec='none'>{$total}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span> </td> <td class='resize'> <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span> </td> </tr> </table> </div> </div> <div id='processing'> <div id='processing_text'> {$processing} </div> </div> <div id='area_search_replace' class='editarea_popup'> <table cellspacing='2' cellpadding='0' style='width: 100%'> <tr> <td selec='none'>{$search}</td> <td><input type='text' id='area_search' /></td> <td id='close_area_search_replace'> <a onclick='Javascript:editArea.execCommand(\"hidden_search\")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br /> </tr><tr> <td selec='none'>{$replace}</td> <td><input type='text' id='area_replace' /></td> <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,\"area_search_replace\", parent.frames[\"frame_\"+editArea.id]);' src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td> </tr> </table> <div class='button'> <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label> <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label> <br /> <a onclick='Javascript:editArea.execCommand(\"area_search\")' selec='none'>{$find_next}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace\")' selec='none'>{$replace}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace_all\")' selec='none'>{$replace_all}</a><br /> </div> <div id='area_search_msg' selec='none'></div> </div> <div id='edit_area_help' class='editarea_popup'> <div class='close_popup'> <a onclick='Javascript:editArea.execCommand(\"close_all_inline_popup\")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a> </div> <div><h2>Editarea [__EA_VERSION__]</h2><br /> <h3>{$shortcuts}:</h3> {$tab}: {$add_tab}<br /> {$shift}+{$tab}: {$remove_tab}<br /> {$ctrl}+f: {$search_command}<br /> {$ctrl}+r: {$replace_command}<br /> {$ctrl}+h: {$highlight}<br /> {$ctrl}+g: {$go_to_line}<br /> {$ctrl}+z: {$undo}<br /> {$ctrl}+y: {$redo}<br /> {$ctrl}+e: {$help}<br /> {$ctrl}+q, {$esc}: {$close_popup}<br /> {$accesskey} E: {$toggle}<br /> <br /> <em>{$about_notice}</em> <br /><div class='copyright'>&copy; Christophe Dolivet - 2007</div> </div> </div> </div> </body> </html> ";
+editAreaLoader.iframe_css= "<style>body, html{margin: 0;padding: 0;height: 100%;border: none;overflow: hidden;background-color: #FFFFFF;}body, html, table, form, textarea{font: 12px monospace, sans-serif;}#editor{border: solid #888888 1px;overflow: visible;}#result{z-index: 4;overflow: auto;border-top: solid #888888 1px;border-bottom: solid #888888 1px;position: relative;clear: both;}#result.empty{overflow: hidden;}#container{overflow: hidden;border: solid blue 0px;position: relative;z-index: 10;padding: 0 5px 0px 0;}#textarea{position: relative;top: 0px;left: 0px;padding: 0px 0px 0px 45px;width: 100%;height: 100%;overflow: hidden;z-index: 7;border: solid green 0px;background-color: transparent;}#textarea, #textarea:hover{outline: none;}#content_highlight{white-space: pre;padding: 1px 0 0 45px;position : absolute;z-index: 4;overflow: visible;border: solid yellow 0px;}#selection_field{padding: 0px 0px 0 45px;background-color: #E1F2F9;height: 1px;position: absolute;z-index: 5;top: -100px;margin: 1px 0 0 0px;white-space: pre;overflow: hidden;}#line_number{position: absolute;overflow: hidden;border-right: solid black 1px;z-index:8;width: 38px;padding-right: 5px;text-align: right;color: #AAAAAA;}#test_font_size{padding: 0;margin: 0;visibility: hidden;position: absolute;white-space: pre;}pre{margin: 0;padding: 0;}.hidden{opacity: 0.2;filter:alpha(opacity=20);}#result .edit_area_cursor{position: absolute;z-index:6;background-color: #FF6633;top: -100px;margin: 1px 0 0 0px;}#result .edit_area_selection_field .overline{background-color: #996600;}.editarea_popup{border: solid 1px #888888;background-color: #ECE9D8;width: 250px;padding: 4px;position: absolute;visibility: hidden;z-index: 15;top: -500px;}.editarea_popup, .editarea_popup table{font-family: sans-serif;font-size: 10pt;}.editarea_popup img{border: 0;}.editarea_popup .close_popup{float: right;line-height: 16px;border: 0px;padding: 0px;}.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{margin: 0px;padding: 0px;}.editarea_popup .copyright{text-align: right;}div#area_search_replace{}div#area_search_replace img{border: 0px;}div#area_search_replace div.button{text-align: center;line-height: 1.7em;}div#area_search_replace .button a{cursor: pointer;border: solid 1px #888888;background-color: #DEDEDE;text-decoration: none;padding: 0 2px;color: #000000;white-space: nowrap;}div#area_search_replace a:hover{background-color: #EDEDED;}div#area_search_replace #move_area_search_replace{cursor: move;border: solid 1px #888888;}div#area_search_replace #close_area_search_replace{text-align: right;vertical-align: top;white-space: nowrap;}div#area_search_replace #area_search_msg{height: 18px;overflow: hidden;border-top: solid 1px #888888;margin-top: 3px;}#edit_area_help{width: 350px;}#edit_area_help div.close_popup{float: right;}.area_toolbar{width: 100%;margin: 0px;padding: 0px;background-color: #ECE9D8;text-align: center;}.area_toolbar, .area_toolbar table{font: 11px sans-serif;}.area_toolbar img{border: 0px;vertical-align: middle;}.area_toolbar input{margin: 0px;padding: 0px;}.area_toolbar select{font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;font-size: 7pt;font-weight: normal;margin: 2px 0 0 0 ;padding: 0;vertical-align: top;background-color: #F0F0EE;}table.statusbar{width: 100%;}.area_toolbar td.infos{text-align: center;width: 130px;border-right: solid 1px #888888;border-width: 0 1px 0 0;padding: 0;}.area_toolbar td.total{text-align: right;width: 50px;padding: 0;}.area_toolbar td.resize{text-align: right;}.area_toolbar span#resize_area{cursor: nw-resize;visibility: hidden;}.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {border: 0px; margin: 0px; padding: 0px; background: transparent;margin-top: 0px;margin-left: 1px;padding: 0px;}.editAreaButtonNormal {border: 1px solid #ECE9D8 !important;cursor: pointer;}.editAreaButtonOver {border: 1px solid #0A246A !important;cursor: pointer;background-color: #B6BDD2;}.editAreaButtonDown {cursor: pointer;border: 1px solid #0A246A !important;background-color: #8592B5;}.editAreaButtonSelected {border: 1px solid #C0C0BB !important;cursor: pointer;background-color: #F4F2E8;}.editAreaButtonDisabled {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);-moz-opacity:0.3;opacity: 0.3;border: 1px solid #F0F0EE !important;cursor: pointer;}.editAreaSeparatorLine {margin: 1px 2px;background-color: #C0C0BB;width: 2px;height: 18px;}#processing{display: none;background-color:#ECE9D8;border: solid #888888 1px;position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index: 100;text-align: center;}#processing_text{position:absolute;left: 50%;top: 50%;width: 200px;height: 20px;margin-left: -100px;margin-top: -10px;text-align: center;}#tab_browsing_area{display: none;background-color: #CCC9A8;border-top: 1px solid #888888;text-align: left;margin: 0px;}#tab_browsing_list {padding: 0;margin: 0;list-style-type: none;white-space: nowrap;}#tab_browsing_list li {float: left;margin: -1px;}#tab_browsing_list a {position: relative;display: block;text-decoration: none;float: left;cursor: pointer;line-height:14px;}#tab_browsing_list a span {display: block;color: #000;background: #ECE9D8;border: 1px solid #888888;border-width: 1px 1px 0px;text-align: center;padding: 2px 2px 1px 4px;position: relative;}#tab_browsing_list a b {display: block;border-bottom: 2px solid #617994;}#tab_browsing_list a .edited {display: none;}#tab_browsing_list a.edited .edited {display: inline;}#tab_browsing_list a img{margin-left: 7px;}#tab_browsing_list a.edited img{margin-left: 3px;}#tab_browsing_list a:hover span {background: #F4F2E8;border-color: #0A246A;}#tab_browsing_list .selected a span{background: #046380;color: #FFF;}#no_file_selected{height: 100%;width: 150%;background: #CCC;display: none;z-index: 20;position: absolute;}.non_editable #editor{border-width: 0 1px;}.non_editable .area_toolbar{display: none;}</style>";
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/close.gif b/BSF/plugins/LocalFilesEditor/editarea/images/close.gif
new file mode 100644
index 000000000..679ca2aa4
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/close.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gif b/BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gif
new file mode 100644
index 000000000..66fa6d921
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gif b/BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gif
new file mode 100644
index 000000000..06042ec9a
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/help.gif b/BSF/plugins/LocalFilesEditor/editarea/images/help.gif
new file mode 100644
index 000000000..51a1ee420
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/help.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/highlight.gif b/BSF/plugins/LocalFilesEditor/editarea/images/highlight.gif
new file mode 100644
index 000000000..16491f6cf
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/highlight.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/index.php b/BSF/plugins/LocalFilesEditor/editarea/images/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/load.gif b/BSF/plugins/LocalFilesEditor/editarea/images/load.gif
new file mode 100644
index 000000000..461698f56
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/load.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/move.gif b/BSF/plugins/LocalFilesEditor/editarea/images/move.gif
new file mode 100644
index 000000000..d15f9f542
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/move.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gif b/BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gif
new file mode 100644
index 000000000..a9d293842
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/opacity.png b/BSF/plugins/LocalFilesEditor/editarea/images/opacity.png
new file mode 100644
index 000000000..b4217cb21
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/opacity.png
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/processing.gif b/BSF/plugins/LocalFilesEditor/editarea/images/processing.gif
new file mode 100644
index 000000000..cce32f20f
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/processing.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/redo.gif b/BSF/plugins/LocalFilesEditor/editarea/images/redo.gif
new file mode 100644
index 000000000..3af90697f
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/redo.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif b/BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif
new file mode 100644
index 000000000..0fa3cb797
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/save.gif b/BSF/plugins/LocalFilesEditor/editarea/images/save.gif
new file mode 100644
index 000000000..2777bebfe
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/save.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/search.gif b/BSF/plugins/LocalFilesEditor/editarea/images/search.gif
new file mode 100644
index 000000000..cfe76b5d5
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/search.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif b/BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif
new file mode 100644
index 000000000..8a532e5e6
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/spacer.gif b/BSF/plugins/LocalFilesEditor/editarea/images/spacer.gif
new file mode 100644
index 000000000..388486517
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/spacer.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif b/BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif
new file mode 100644
index 000000000..af89d803f
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/undo.gif b/BSF/plugins/LocalFilesEditor/editarea/images/undo.gif
new file mode 100644
index 000000000..520796d69
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/images/undo.gif
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/index.php b/BSF/plugins/LocalFilesEditor/editarea/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/cs.js b/BSF/plugins/LocalFilesEditor/editarea/langs/cs.js
new file mode 100644
index 000000000..cb7ff1e89
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/cs.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["cs"]={
+new_document: "Nový dokument",
+search_button: "Najdi a nahraď",
+search_command: "Hledej další / otevři vyhledávací pole",
+search: "Hledej",
+replace: "Nahraď",
+replace_command: "Nahraď / otevři vyhledávací pole",
+find_next: "Najdi další",
+replace_all: "Nahraď vše",
+reg_exp: "platné výrazy",
+match_case: "vyhodnocené výrazy",
+not_found: "nenalezené.",
+occurrence_replaced: "výskyty nahrazené.",
+search_field_empty: "Pole vyhledávání je prázdné",
+restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
+move_popup: "Přesuň vyhledávací okno",
+font_size: "--Velikost textu--",
+go_to_line: "Přejdi na řádek",
+go_to_line_prompt: "Přejdi na řádek:",
+undo: "krok zpět",
+redo: "znovu",
+change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
+highlight: "Zvýrazňování syntaxe zap./vyp.",
+reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
+help: "O programu",
+save: "Uložit",
+load: "Otevřít",
+line_abbr: "Ř.",
+char_abbr: "S.",
+position: "Pozice",
+total: "Celkem",
+close_popup: "Zavřít okno",
+shortcuts: "Zkratky",
+add_tab: "Přidat tabulování textu",
+remove_tab: "Odtsranit tabulování textu",
+about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
+toggle: "Přepnout editor",
+accesskey: "Přístupová klávesa",
+tab: "Záložka",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Zpracovávám ...",
+fullscreen: "Celá obrazovka",
+syntax_selection: "--vyber zvýrazňovač--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/de.js b/BSF/plugins/LocalFilesEditor/editarea/langs/de.js
new file mode 100644
index 000000000..cd953473f
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/de.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["de"]={
+new_document: "Neues Dokument",
+search_button: "Suchen und Ersetzen",
+search_command: "Weitersuchen / &ouml;ffne Suchfeld",
+search: "Suchen",
+replace: "Ersetzen",
+replace_command: "Ersetzen / &ouml;ffne Suchfeld",
+find_next: "Weitersuchen",
+replace_all: "Ersetze alle Treffer",
+reg_exp: "regul&auml;re Ausdr&uuml;cke",
+match_case: "passt auf den Begriff<br />",
+not_found: "Nicht gefunden.",
+occurrence_replaced: "Die Vorkommen wurden ersetzt.",
+search_field_empty: "Leeres Suchfeld",
+restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
+move_popup: "Suchfenster bewegen",
+font_size: "--Schriftgr&ouml;&szlig;e--",
+go_to_line: "Gehe zu Zeile",
+go_to_line_prompt: "Gehe zu Zeilennummmer:",
+undo: "R&uuml;ckg&auml;ngig",
+redo: "Wiederherstellen",
+change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
+highlight: "Syntax Highlighting an- und ausschalten",
+reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",
+help: "Info",
+save: "Speichern",
+load: "&Ouml;ffnen",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Gesamt",
+close_popup: "Popup schlie&szlig;en",
+shortcuts: "Shortcuts",
+add_tab: "Tab zum Text hinzuf&uuml;gen",
+remove_tab: "Tab aus Text entfernen",
+about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",
+toggle: "Editor an- und ausschalten",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "In Bearbeitung...",
+fullscreen: "Full-Screen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/dk.js b/BSF/plugins/LocalFilesEditor/editarea/langs/dk.js
new file mode 100644
index 000000000..75700ec65
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/dk.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["dk"]={
+new_document: "nyt tomt dokument",
+search_button: "s&oslash;g og erstat",
+search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",
+search: "s&oslash;g",
+replace: "erstat",
+replace_command: "erstat / &aring;ben s&oslash;gefelt",
+find_next: "find n&aelig;ste",
+replace_all: "erstat alle",
+reg_exp: "regular expressions",
+match_case: "forskel på store/sm&aring; bogstaver<br />",
+not_found: "not found.",
+occurrence_replaced: "occurences replaced.",
+search_field_empty: "Search field empty",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "flyt søgepopup",
+font_size: "--Skriftstørrelse--",
+go_to_line: "g&aring; til linie",
+go_to_line_prompt: "gå til linienummer:",
+undo: "fortryd",
+redo: "gentag",
+change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",
+highlight: "sl&aring; syntax highlight til/fra",
+reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
+help: "om",
+save: "gem",
+load: "hent",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "luk popup",
+shortcuts: "Genveje",
+add_tab: "tilf&oslash;j tabulation til tekst",
+remove_tab: "fjern tabulation fra tekst",
+about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",
+toggle: "Sl&aring; editor til / fra",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Skift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processing...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/en.js b/BSF/plugins/LocalFilesEditor/editarea/langs/en.js
new file mode 100644
index 000000000..aa432163b
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/en.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["en"]={
+new_document: "new empty document",
+search_button: "search and replace",
+search_command: "search next / open search area",
+search: "search",
+replace: "replace",
+replace_command: "replace / open search area",
+find_next: "find next",
+replace_all: "replace all",
+reg_exp: "regular expressions",
+match_case: "match case",
+not_found: "not found.",
+occurrence_replaced: "occurences replaced.",
+search_field_empty: "Search field empty",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "move search popup",
+font_size: "--Font size--",
+go_to_line: "go to line",
+go_to_line_prompt: "go to line number:",
+undo: "undo",
+redo: "redo",
+change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
+highlight: "toggle syntax highlight on/off",
+reset_highlight: "reset highlight (if desyncronized from text)",
+help: "about",
+save: "save",
+load: "load",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "close popup",
+shortcuts: "Shortcuts",
+add_tab: "add tabulation to text",
+remove_tab: "remove tabulation to text",
+about_notice: "Notice: syntax highlight function is only for small text",
+toggle: "Toggle editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processing...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/es.js b/BSF/plugins/LocalFilesEditor/editarea/langs/es.js
new file mode 100644
index 000000000..0e425014a
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/es.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["es"]={
+new_document: "nuevo documento vacío",
+search_button: "buscar y reemplazar",
+search_command: "buscar siguiente / abrir área de búsqueda",
+search: "buscar",
+replace: "reemplazar",
+replace_command: "reemplazar / abrir área de búsqueda",
+find_next: "encontrar siguiente",
+replace_all: "reemplazar todos",
+reg_exp: "expresiones regulares",
+match_case: "coincidir capitalización",
+not_found: "no encontrado.",
+occurrence_replaced: "ocurrencias reemplazadas.",
+search_field_empty: "Campo de búsqueda vacío",
+restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",
+move_popup: "mover la ventana de búsqueda",
+font_size: "--Tamaño de la fuente--",
+go_to_line: "ir a la línea",
+go_to_line_prompt: "ir a la línea número:",
+undo: "deshacer",
+redo: "rehacer",
+change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",
+highlight: "intercambiar resaltado de sintaxis",
+reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
+help: "acerca",
+save: "guardar",
+load: "cargar",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posición",
+total: "Total",
+close_popup: "recuadro de cierre",
+shortcuts: "Atajos",
+add_tab: "añadir tabulado al texto",
+remove_tab: "borrar tabulado del texto",
+about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",
+toggle: "Cambiar editor",
+accesskey: "Tecla de acceso",
+tab: "Tab",
+shift: "Mayúsc",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Procesando...",
+fullscreen: "pantalla completa",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/fr.js b/BSF/plugins/LocalFilesEditor/editarea/langs/fr.js
new file mode 100644
index 000000000..b24bd03ae
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/fr.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["fr"]={
+new_document: "nouveau document (efface le contenu)",
+search_button: "rechercher / remplacer",
+search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",
+search: "rechercher",
+replace: "remplacer",
+replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",
+find_next: "rechercher",
+replace_all: "tout remplacer",
+reg_exp: "expr. r&eacute;guli&egrave;re",
+match_case: "respecter la casse",
+not_found: "pas trouv&eacute;.",
+occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",
+search_field_empty: "Le champ de recherche est vide.",
+restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",
+move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",
+font_size: "--Taille police--",
+go_to_line: "aller &agrave; la ligne",
+go_to_line_prompt: "aller a la ligne numero:",
+undo: "annuler",
+redo: "refaire",
+change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
+highlight: "activer/d&eacute;sactiver la coloration syntaxique",
+reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",
+help: "&agrave; propos",
+save: "sauvegarder",
+load: "charger",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "fermer le popup",
+shortcuts: "Racourcis clavier",
+add_tab: "ajouter une tabulation dans le texte",
+remove_tab: "retirer une tabulation dans le texte",
+about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",
+toggle: "basculer l'&eacute;diteur",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Maj",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "chargement...",
+fullscreen: "plein &eacute;cran",
+syntax_selection: "--Syntaxe--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Fermer le fichier"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/hr.js b/BSF/plugins/LocalFilesEditor/editarea/langs/hr.js
new file mode 100644
index 000000000..f37b28c5e
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/hr.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["hr"]={
+new_document: "Novi dokument",
+search_button: "Traži i izmijeni",
+search_command: "Traži dalje / Otvori prozor za traženje",
+search: "Traži",
+replace: "Izmijeni",
+replace_command: "Izmijeni / Otvori prozor za traženje",
+find_next: "Traži dalje",
+replace_all: "Izmjeni sve",
+reg_exp: "Regularni izrazi",
+match_case: "Bitna vel. slova",
+not_found: "nije naðeno.",
+occurrence_replaced: "izmjenjenih.",
+search_field_empty: "Prazno polje za traženje!",
+restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
+move_popup: "Pomakni prozor",
+font_size: "--Velièina teksta--",
+go_to_line: "Odi na redak",
+go_to_line_prompt: "Odi na redak:",
+undo: "Vrati natrag",
+redo: "Napravi ponovo",
+change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
+highlight: "Ukljuèi/iskljuèi bojanje sintakse",
+reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
+help: "O edit_area",
+save: "Spremi",
+load: "Uèitaj",
+line_abbr: "Ln",
+char_abbr: "Zn",
+position: "Pozicija",
+total: "Ukupno",
+close_popup: "Zatvori prozor",
+shortcuts: "Kratice",
+add_tab: "Dodaj tabulaciju",
+remove_tab: "Makni tabulaciju",
+about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
+toggle: "Prebaci naèin ureðivanja",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Procesiram...",
+fullscreen: "Cijeli prozor",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/index.php b/BSF/plugins/LocalFilesEditor/editarea/langs/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/it.js b/BSF/plugins/LocalFilesEditor/editarea/langs/it.js
new file mode 100644
index 000000000..2191e6b26
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/it.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["it"]={
+new_document: "nuovo documento vuoto",
+search_button: "cerca e sostituisci",
+search_command: "trova successivo / apri finestra di ricerca",
+search: "cerca",
+replace: "sostituisci",
+replace_command: "sostituisci / apri finestra di ricerca",
+find_next: "trova successivo",
+replace_all: "sostituisci tutti",
+reg_exp: "espressioni regolari",
+match_case: "confronta maiuscole/minuscole<br />",
+not_found: "non trovato.",
+occurrence_replaced: "occorrenze sostituite.",
+search_field_empty: "Campo ricerca vuoto",
+restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
+move_popup: "sposta popup di ricerca",
+font_size: "-- Dimensione --",
+go_to_line: "vai alla linea",
+go_to_line_prompt: "vai alla linea numero:",
+undo: "annulla",
+redo: "ripeti",
+change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
+highlight: "abilita/disabilita colorazione della sintassi",
+reset_highlight: "aggiorna colorazione (se non sincronizzata)",
+help: "informazioni su...",
+save: "salva",
+load: "carica",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posizione",
+total: "Totale",
+close_popup: "chiudi popup",
+shortcuts: "Scorciatoie",
+add_tab: "aggiungi tabulazione",
+remove_tab: "rimuovi tabulazione",
+about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
+toggle: "Abilita/disabilita editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "In corso...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/ja.js b/BSF/plugins/LocalFilesEditor/editarea/langs/ja.js
new file mode 100644
index 000000000..3afc1cb7d
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/ja.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["ja"]={
+new_document: "新規作成",
+search_button: "検索・置換",
+search_command: "次を検索 / 検索窓を表示",
+search: "検索",
+replace: "置換",
+replace_command: "置換 / 置換窓を表示",
+find_next: "次を検索",
+replace_all: "全置換",
+reg_exp: "正規表現",
+match_case: "大文字小文字の区別",
+not_found: "見つかりません。",
+occurrence_replaced: "置換しました。",
+search_field_empty: "検索対象文字列が空です。",
+restart_search_at_begin: "終端に達しました、始めに戻ります",
+move_popup: "検索窓を移動",
+font_size: "--フォントサイズ--",
+go_to_line: "指定行へ移動",
+go_to_line_prompt: "指定行へ移動します:",
+undo: "元に戻す",
+redo: "やり直し",
+change_smooth_selection: "スムース表示の切り替え(CPUを使います)",
+highlight: "構文強調表示の切り替え",
+reset_highlight: "構文強調表示のリセット",
+help: "ヘルプを表示",
+save: "保存",
+load: "読み込み",
+line_abbr: "行",
+char_abbr: "文字",
+position: "位置",
+total: "合計",
+close_popup: "ポップアップを閉じる",
+shortcuts: "ショートカット",
+add_tab: "タブを挿入する",
+remove_tab: "タブを削除する",
+about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
+toggle: "テキストエリアとeditAreaの切り替え",
+accesskey: "アクセスキー",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "処理中です...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/mk.js b/BSF/plugins/LocalFilesEditor/editarea/langs/mk.js
new file mode 100644
index 000000000..7cacb038c
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/mk.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["mk"]={
+new_document: "Нов документ",
+search_button: "Најди и замени",
+search_command: "Барај следно / Отвори нов прозорец за пребарување",
+search: "Барај",
+replace: "Замени",
+replace_command: "Замени / Отвори прозорец за пребарување",
+find_next: "најди следно",
+replace_all: "Замени ги сите",
+reg_exp: "Регуларни изрази",
+match_case: "Битна е големината на буквите",
+not_found: "не е пронајдено.",
+occurrence_replaced: "замени.",
+search_field_empty: "Полето за пребарување е празно",
+restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
+move_popup: "Помести го прозорецот",
+font_size: "--Големина на текстот--",
+go_to_line: "Оди на линија",
+go_to_line_prompt: "Оди на линија со број:",
+undo: "Врати",
+redo: "Повтори",
+change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
+highlight: "Вклучи/исклучи осветлување на синтакса",
+reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
+help: "За",
+save: "Зачувај",
+load: "Вчитај",
+line_abbr: "Лн",
+char_abbr: "Зн",
+position: "Позиција",
+total: "Вкупно",
+close_popup: "Затвори го прозорецот",
+shortcuts: "Кратенки",
+add_tab: "Додај табулација на текстот",
+remove_tab: "Отстрани ја табулацијата",
+about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
+toggle: "Смени начин на уредување",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Обработувам...",
+fullscreen: "Цел прозорец",
+syntax_selection: "--Синтакса--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Избери датотека"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/nl.js b/BSF/plugins/LocalFilesEditor/editarea/langs/nl.js
new file mode 100644
index 000000000..00cbbe3a6
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/nl.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["nl"]={
+new_document: "nieuw leeg document",
+search_button: "zoek en vervang",
+search_command: "zoek volgende / zoekscherm openen",
+search: "zoek",
+replace: "vervang",
+replace_command: "vervang / zoekscherm openen",
+find_next: "volgende vinden",
+replace_all: "alles vervangen",
+reg_exp: "reguliere expressies",
+match_case: "hoofdletter gevoelig",
+not_found: "niet gevonden.",
+occurrence_replaced: "object vervangen.",
+search_field_empty: "Zoek veld leeg",
+restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
+move_popup: "versleep zoek scherm",
+font_size: "--Letter grootte--",
+go_to_line: "Ga naar regel",
+go_to_line_prompt: "Ga naar regel nummer:",
+undo: "Ongedaan maken",
+redo: "Opnieuw doen",
+change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
+highlight: "zet syntax highlight aan/uit",
+reset_highlight: "reset highlight (indien gedesynchronizeerd)",
+help: "informatie",
+save: "opslaan",
+load: "laden",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Positie",
+total: "Totaal",
+close_popup: "Popup sluiten",
+shortcuts: "Snelkoppelingen",
+add_tab: "voeg tabs toe in tekst",
+remove_tab: "verwijder tabs uit tekst",
+about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
+toggle: "geavanceerde bewerkingsopties",
+accesskey: "Accessknop",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Verwerken...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/pl.js b/BSF/plugins/LocalFilesEditor/editarea/langs/pl.js
new file mode 100644
index 000000000..501ec9a2b
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/pl.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["pl"]={
+new_document: "nowy dokument",
+search_button: "znajdź i zamień",
+search_command: "znajdź następny",
+search: "znajdź",
+replace: "zamień",
+replace_command: "zamień",
+find_next: "następny",
+replace_all: "zamień wszystko",
+reg_exp: "wyrażenie regularne",
+match_case: "uwzględnij wielkość liter<br />",
+not_found: "nie znaleziono.",
+occurrence_replaced: "wystąpień zamieniono.",
+search_field_empty: "Nie wprowadzono tekstu",
+restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
+move_popup: "przesuń okienko wyszukiwania",
+font_size: "Rozmiar",
+go_to_line: "idź do linii",
+go_to_line_prompt: "numer linii:",
+undo: "cofnij",
+redo: "przywróć",
+change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
+highlight: "włącz/wyłącz podświetlanie składni",
+reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
+help: "o programie",
+save: "zapisz",
+load: "otwórz",
+line_abbr: "Ln",
+char_abbr: "Zn",
+position: "Pozycja",
+total: "W sumie",
+close_popup: "zamknij okienko",
+shortcuts: "Skróty klawiaturowe",
+add_tab: "dodaj wcięcie do zaznaczonego tekstu",
+remove_tab: "usuń wcięcie",
+about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
+toggle: "Włącz/wyłącz edytor",
+accesskey: "Alt+",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Przetwarzanie...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/pt.js b/BSF/plugins/LocalFilesEditor/editarea/langs/pt.js
new file mode 100644
index 000000000..547796b0a
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/pt.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["pt"]={
+new_document: "Novo documento",
+search_button: "Localizar e substituir",
+search_command: "Localizar próximo",
+search: "Localizar",
+replace: "Substituir",
+replace_command: "Substituir",
+find_next: "Localizar",
+replace_all: "Subst. tudo",
+reg_exp: "Expressões regulares",
+match_case: "Diferenciar maiúsculas e minúsculas",
+not_found: "Não encontrado.",
+occurrence_replaced: "Ocorrências substituidas",
+search_field_empty: "Campo localizar vazio.",
+restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
+move_popup: "Mover janela",
+font_size: "--Tamanho da fonte--",
+go_to_line: "Ir para linha",
+go_to_line_prompt: "Ir para a linha:",
+undo: "Desfazer",
+redo: "Refazer",
+change_smooth_selection: "Opções visuais",
+highlight: "Cores de sintaxe",
+reset_highlight: "Resetar cores (se não sincronizado)",
+help: "Sobre",
+save: "Salvar",
+load: "Carregar",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posição",
+total: "Total",
+close_popup: "Fechar",
+shortcuts: "Shortcuts",
+add_tab: "Adicionar tabulação",
+remove_tab: "Remover tabulação",
+about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
+toggle: "Exibir editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processando...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/ru.js b/BSF/plugins/LocalFilesEditor/editarea/langs/ru.js
new file mode 100644
index 000000000..56b3cd57c
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/ru.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["ru"]={
+new_document: "новый пустой документ",
+search_button: "поиск и замена",
+search_command: "искать следующий / открыть панель поиска",
+search: "поиск",
+replace: "замена",
+replace_command: "заменить / открыть панель поиска",
+find_next: "найти следующее",
+replace_all: "заменить все",
+reg_exp: "регулярное выражение",
+match_case: "учитывать регистр",
+not_found: "не найдено.",
+occurrence_replaced: "вхождение заменено.",
+search_field_empty: "Поле поиска пустое",
+restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
+move_popup: "переместить окно поиска",
+font_size: "--Размер шрифта--",
+go_to_line: "перейти к строке",
+go_to_line_prompt: "перейти к строке номер:",
+undo: "отменить",
+redo: "вернуть",
+change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
+highlight: "переключить подсветку синтаксиса включена/выключена",
+reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
+help: "о программе",
+save: "сохранить",
+load: "загрузить",
+line_abbr: "Стр",
+char_abbr: "Стлб",
+position: "Позиция",
+total: "Всего",
+close_popup: "закрыть всплывающее окно",
+shortcuts: "Горячие клавиши",
+add_tab: "добавить табуляцию в текст",
+remove_tab: "убрать табуляцию из текста",
+about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
+toggle: "Переключить редактор",
+accesskey: "Горячая клавиша",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Обработка...",
+fullscreen: "полный экран",
+syntax_selection: "--Синтакс--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Закрыть файл"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/sk.js b/BSF/plugins/LocalFilesEditor/editarea/langs/sk.js
new file mode 100644
index 000000000..3d4881a3f
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/langs/sk.js
@@ -0,0 +1,61 @@
+editAreaLoader.lang["sk"]={
+new_document: "nový prázdy dokument",
+search_button: "vyhľadaj a nahraď",
+search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
+search: "hľadaj",
+replace: "nahraď",
+replace_command: "nahraď / otvor vyhľadávacie pole",
+find_next: "nájdi ďalšie",
+replace_all: "nahraď všetko",
+reg_exp: "platné výrazy",
+match_case: "zhodujúce sa výrazy",
+not_found: "nenájdené.",
+occurrence_replaced: "výskyty nahradené.",
+search_field_empty: "Pole vyhľadávanie je prádzne",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "presuň vyhľadávacie okno",
+font_size: "--Veľkosť textu--",
+go_to_line: "prejdi na riadok",
+go_to_line_prompt: "prejdi na riadok:",
+undo: "krok späť",
+redo: "prepracovať",
+change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)",
+highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",
+reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",
+help: "o programe",
+save: "uložiť",
+load: "načítať",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Pozícia",
+total: "Spolu",
+close_popup: "zavrieť okno",
+shortcuts: "Skratky",
+add_tab: "pridať tabulovanie textu",
+remove_tab: "odstrániť tabulovanie textu",
+about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",
+toggle: "Prepnúť editor",
+accesskey: "Accesskey",
+tab: "Záložka",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Spracúvam...",
+fullscreen: "cel=a obrazovka",
+syntax_selection: "--Vyber Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+close_tab: "Close file"
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js
new file mode 100644
index 000000000..b8131ccdd
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js
@@ -0,0 +1,84 @@
+editAreaLoader.load_syntax["css"] = {
+ 'COMMENT_SINGLE' : {1 : '@'}
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
+ ,'QUOTEMARKS' : ['"', "'"]
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ 'attributes' : [
+ 'aqua', 'azimuth', 'background-attachment', 'background-color',
+ 'background-image', 'background-position', 'background-repeat',
+ 'background', 'border-bottom-color', 'border-bottom-style',
+ 'border-bottom-width', 'border-left-color', 'border-left-style',
+ 'border-left-width', 'border-right', 'border-right-color',
+ 'border-right-style', 'border-right-width', 'border-top-color',
+ 'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
+ 'border-left', 'border-width', 'border-color', 'border-spacing',
+ 'border-style', 'border-top', 'border', 'caption-side',
+ 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
+ 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
+ 'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
+ 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
+ 'font-weight', 'font', 'height', 'letter-spacing', 'line-height',
+ 'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
+ 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
+ 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
+ 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',
+ 'outline-width', 'overflow', 'padding-bottom', 'padding-left',
+ 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
+ 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
+ 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
+ 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
+ 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
+ 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
+ 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
+ 'width', 'word-spacing', 'z-index', 'bottom', 'left'
+ ]
+ ,'values' : [
+ 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
+ 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',
+ 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic',
+ 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
+ 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
+ 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
+ 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
+ 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
+ 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
+ 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
+ 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
+ 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
+ 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
+ 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
+ 'pointer', 'portrait', 'purple', 'px',
+ 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
+ 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
+ 'static', 'status-bar', 'super', 'sw-resize',
+ 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
+ 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
+ 'visible',
+ 'w-resize', 'wait', 'white', 'wider',
+ 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
+ 'yellow', 'yes'
+ ]
+ ,'specials' : [
+ 'important'
+ ]
+ }
+ ,'OPERATORS' :[
+ ':', ';', '!', '.', '#'
+ ]
+ ,'DELIMITERS' :[
+ '{', '}'
+ ]
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : {
+ 'attributes' : 'color: #48BDDF;'
+ ,'values' : 'color: #2B60FF;'
+ ,'specials' : 'color: #FF0000;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #60CA00;'
+
+ }
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js
new file mode 100644
index 000000000..cc2a90e6e
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js
@@ -0,0 +1,50 @@
+/*
+* last update: 2006-08-24
+*/
+
+editAreaLoader.load_syntax["html"] = {
+ 'COMMENT_SINGLE' : {}
+ ,'COMMENT_MULTI' : {'<!--' : '-->'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ }
+ ,'OPERATORS' :[
+ ]
+ ,'DELIMITERS' :[
+ ]
+ ,'REGEXPS' : {
+ 'doctype' : {
+ 'search' : '()(<!DOCTYPE[^>]*>)()'
+ ,'class' : 'doctype'
+ ,'modifiers' : ''
+ ,'execute' : 'before' // before or after
+ }
+ ,'tags' : {
+ 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
+ ,'class' : 'tags'
+ ,'modifiers' : 'gi'
+ ,'execute' : 'before' // before or after
+ }
+ ,'attributes' : {
+ 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
+ ,'class' : 'attributes'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ }
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : {
+ }
+ ,'OPERATORS' : 'color: #E775F0;'
+ ,'DELIMITERS' : ''
+ ,'REGEXPS' : {
+ 'attributes': 'color: #B1AC41;'
+ ,'tags': 'color: #E62253;'
+ ,'doctype': 'color: #8DCFB5;'
+ ,'test': 'color: #00FF00;'
+ }
+ }
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
new file mode 100644
index 000000000..8c7beb624
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
@@ -0,0 +1,60 @@
+editAreaLoader.load_syntax["js"] = {
+ 'COMMENT_SINGLE' : {1 : '//'}
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ 'statements' : [
+ 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
+ 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
+ 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
+ 'while', 'write', 'with'
+ ]
+ ,'keywords' : [
+ 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
+ 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
+ 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',
+ // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
+ 'Link ', 'outerHeight ', 'Anchor', 'FileUpload',
+ 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self',
+ 'arguments', 'locationbar', 'pageXoffset', 'Form',
+ 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status',
+ 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy',
+ 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden',
+ 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents',
+ 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text',
+ 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity',
+ 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed',
+ 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents',
+ 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus',
+ 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document',
+ 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window',
+ 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'
+ ]
+ ,'functions' : [
+ // common functions for Window object
+ 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
+ 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
+ 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
+ 'stop'
+ ]
+ }
+ ,'OPERATORS' :[
+ '+', '-', '/', '*', '=', '<', '>', '%', '!'
+ ]
+ ,'DELIMITERS' :[
+ '(', ')', '[', ']', '{', '}'
+ ]
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : {
+ 'statements' : 'color: #60CA00;'
+ ,'keywords' : 'color: #48BDDF;'
+ ,'functions' : 'color: #2B60FF;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #0038E1;'
+
+ }
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js
new file mode 100644
index 000000000..535a22bd3
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js
@@ -0,0 +1,75 @@
+editAreaLoader.load_syntax["php"] = {
+ 'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ 'statements' : [
+ 'include', 'require', 'include_once', 'require_once',
+ 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
+ 'endif', 'switch', 'case', 'endswitch',
+ 'return', 'break', 'continue'
+ ]
+ ,'reserved' : [
+ '_GET', '_POST', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',
+ 'null', '__LINE__', '__FILE__',
+ 'false', '&lt;?php', '?&gt;', '&lt;?',
+ '&lt;script language', '&lt;/script&gt;',
+ 'true', 'var', 'default',
+ 'function', 'class', 'new', '&amp;new', 'this',
+ '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
+ 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
+ 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
+ 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
+ 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
+ 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
+ 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
+
+ ]
+ ,'functions' : [
+ 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
+ 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
+ 'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
+ 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
+ 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
+ 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
+ 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
+ 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
+ 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
+ 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
+ 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
+ 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
+ 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
+
+ ]
+ }
+ ,'OPERATORS' :[
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'
+ ]
+ ,'DELIMITERS' :[
+ '(', ')', '[', ']', '{', '}'
+ ]
+ ,'REGEXPS' : {
+ // highlight all variables ($...)
+ 'variables' : {
+ 'search' : '()(\\$\\w+)()'
+ ,'class' : 'variables'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ }
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #879EFA;'
+ ,'KEYWORDS' : {
+ 'reserved' : 'color: #48BDDF;'
+ ,'functions' : 'color: #0040FD;'
+ ,'statements' : 'color: #60CA00;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #2B60FF;'
+ ,'REGEXPS' : {
+ 'variables' : 'color: #E0BD54;'
+ }
+ }
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js
new file mode 100644
index 000000000..f4530a99c
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js
@@ -0,0 +1,55 @@
+editAreaLoader.load_syntax["sql"] = {
+ 'COMMENT_SINGLE' : {1 : '--'}
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ 'statements' : [
+ 'select', 'SELECT', 'where', 'order', 'by',
+ 'insert', 'from', 'update', 'grant', 'left join', 'right join',
+ 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'
+ ]
+ ,'reserved' : [
+ 'null', 'enum', 'int', 'boolean', 'add', 'varchar'
+
+ ]
+ ,'functions' : [
+ 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',
+'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',
+'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',
+'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',
+'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',
+'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',
+'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'
+ ]
+ }
+ ,'OPERATORS' :[
+ 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'
+ ]
+ ,'DELIMITERS' :[
+ '(', ')', '[', ']', '{', '}'
+ ]
+ ,'REGEXPS' : {
+ // highlight all variables (@...)
+ 'variables' : {
+ 'search' : '()(\\@\\w+)()'
+ ,'class' : 'variables'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ }
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #879EFA;'
+ ,'KEYWORDS' : {
+ 'reserved' : 'color: #48BDDF;'
+ ,'functions' : 'color: #0040FD;'
+ ,'statements' : 'color: #60CA00;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #2B60FF;'
+ ,'REGEXPS' : {
+ 'variables' : 'color: #E0BD54;'
+ }
+ }
+};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js
new file mode 100644
index 000000000..a043dd63a
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js
@@ -0,0 +1,56 @@
+/*
+* last update: 2006-08-24
+*/
+
+editAreaLoader.load_syntax["xml"] = {
+ 'COMMENT_SINGLE' : {}
+ ,'COMMENT_MULTI' : {'<!--' : '-->'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ }
+ ,'OPERATORS' :[
+ ]
+ ,'DELIMITERS' :[
+ ]
+ ,'REGEXPS' : {
+ 'xml' : {
+ 'search' : '()(<\\?[^>]*?\\?>)()'
+ ,'class' : 'xml'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ ,'cdatas' : {
+ 'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'
+ ,'class' : 'cdata'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ ,'tags' : {
+ 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
+ ,'class' : 'tags'
+ ,'modifiers' : 'gi'
+ ,'execute' : 'before' // before or after
+ }
+ ,'attributes' : {
+ 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
+ ,'class' : 'attributes'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ }
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : {
+ }
+ ,'OPERATORS' : 'color: #E775F0;'
+ ,'DELIMITERS' : ''
+ ,'REGEXPS' : {
+ 'attributes': 'color: #B1AC41;'
+ ,'tags': 'color: #E62253;'
+ ,'xml': 'color: #8DCFB5;'
+ ,'cdata': 'color: #50B020;'
+ }
+ }
+};
diff --git a/BSF/plugins/LocalFilesEditor/functions.inc.php b/BSF/plugins/LocalFilesEditor/functions.inc.php
new file mode 100644
index 000000000..b53806bfb
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/functions.inc.php
@@ -0,0 +1,70 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/**
+ * returns $code if php syntax is correct
+ * else return false
+ *
+ * @param string php code
+ */
+function eval_syntax($code)
+{
+ $code = str_replace(array('<?php', '?>'), '', $code);
+ $b = 0;
+ foreach (token_get_all($code) as $token)
+ {
+ if ('{' == $token) ++$b;
+ else if ('}' == $token) --$b;
+ }
+ if ($b) return false;
+ else
+ {
+ ob_start();
+ $eval = eval('if(0){' . $code . '}');
+ ob_end_clean();
+ if ($eval === false) return false;
+ else return '<?php' . $code . '?>';
+ }
+}
+
+/**
+ * returns true or false if $str is bool
+ * returns $str if $str is integer
+ * else "$str"
+ *
+ * @param string
+ */
+function editarea_quote($value)
+{
+ switch (gettype($value))
+ {
+ case "boolean":
+ return $value ? 'true' : 'false';
+ case "integer":
+ return $value;
+ default:
+ return '"'.$value.'"';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/index.php b/BSF/plugins/LocalFilesEditor/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/language/en_UK/index.php b/BSF/plugins/LocalFilesEditor/language/en_UK/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/en_UK/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php b/BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
new file mode 100644
index 000000000..9f608efca
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
@@ -0,0 +1,45 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+$lang['locfiledit_onglet_localconf'] = 'Local config';
+$lang['locfiledit_onglet_css'] = 'CSS';
+$lang['locfiledit_onglet_tpl'] = 'Templates';
+$lang['locfiledit_onglet_lang'] = 'Languages';
+$lang['locfiledit_onglet_plug'] = 'Personal Plugin';
+$lang['locfiledit_cant_save'] = 'Current file isn\'t writeable. Check if a directory "include/" is writeable (chmod).';
+$lang['locfiledit_newfile'] = "/* File is not existing and will be created by LocalFiles Editor. */";
+$lang['locfiledit_save_config'] = 'File written successfully.';
+$lang['locfiledit_show_default'] = 'Display reference file: ';
+$lang['locfiledit_save_bak'] = 'Backup copy will be created on save.';
+$lang['locfiledit_saved_bak'] = 'Backup file created (%s)';
+$lang['locfiledit_save_file'] = 'Save file';
+$lang['locfiledit_choose_file'] = 'Choose the file to be edited';
+$lang['locfiledit_edit'] = 'Edit';
+$lang['locfiledit_restore'] = 'Restore the backup file';
+$lang['locfiledit_restore_confirm'] = 'Please confirm?
+Restore won\'t be effective till next save.';
+$lang['locfiledit_bak_loaded1'] = 'Backup file loaded.';
+$lang['locfiledit_bak_loaded2'] = 'You must save file to restore it.';
+$lang['locfiledit_syntax_error'] = 'Syntax error! File can\'t be saved.';
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/language/es_ES/index.php b/BSF/plugins/LocalFilesEditor/language/es_ES/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/es_ES/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php b/BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
new file mode 100644
index 000000000..3652a53e1
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
@@ -0,0 +1,45 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+$lang['locfiledit_onglet_localconf'] = 'Configuración local';
+$lang['locfiledit_onglet_css'] = 'CSS';
+$lang['locfiledit_onglet_tpl'] = 'Templates';
+$lang['locfiledit_onglet_lang'] = 'Idiomas';
+$lang['locfiledit_onglet_plug'] = 'Plugin personal';
+$lang['locfiledit_cant_save'] = 'Imposible escribir el fichero. Verifique los permisos (chmod) del expediente "include/".';
+$lang['locfiledit_newfile'] = "/* El fichero no existe y será creado en el momento del registro por LocalFiles Editor. */";
+$lang['locfiledit_save_config'] = 'El fichero ha sido registrado.';
+$lang['locfiledit_show_default'] = 'Fijar el fichero ';
+$lang['locfiledit_save_bak'] = 'Una copia de salvaguardia del fichero será creada en el momento del registro';
+$lang['locfiledit_saved_bak'] = 'Una copia de salvaguardia ha sido creada (%s)';
+$lang['locfiledit_save_file'] = 'Registrar el fichero';
+$lang['locfiledit_choose_file'] = 'Escoja un fichero que hay que editar';
+$lang['locfiledit_edit'] = 'Editar';
+$lang['locfiledit_restore'] = 'Cargar el fichero de salvaguardia';
+$lang['locfiledit_restore_confirm'] = '¿ Desea cargar el fichero de salvaguardia?
+Usted deberá luego hacer clic Registrar para restaurarlo.';
+$lang['locfiledit_bak_loaded1'] = 'Fichero cargado de salvaguardia';
+$lang['locfiledit_bak_loaded2'] = 'Usted debe registrarlo para salvaguardarlo.';
+$lang['locfiledit_syntax_error'] = '¡ Error de sintaxis! Imposible registrar el fichero.';
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/language/fr_FR/index.php b/BSF/plugins/LocalFilesEditor/language/fr_FR/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/fr_FR/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php b/BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
new file mode 100644
index 000000000..3e0b65227
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
@@ -0,0 +1,45 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+$lang['locfiledit_onglet_localconf'] = 'Configuration locale';
+$lang['locfiledit_onglet_css'] = 'CSS';
+$lang['locfiledit_onglet_tpl'] = 'Templates';
+$lang['locfiledit_onglet_lang'] = 'Langues';
+$lang['locfiledit_onglet_plug'] = 'Plugin Personnel';
+$lang['locfiledit_cant_save'] = 'Impossible d\'écrire le fichier. Vérifiez les permissions (chmod) du dossier "include/".';
+$lang['locfiledit_newfile'] = "/* Le fichier n'existe pas et sera créé lors de l'enregistrement par LocalFiles Editor. */";
+$lang['locfiledit_save_config'] = 'Le fichier a été enregistré.';
+$lang['locfiledit_show_default'] = 'Afficher le fichier ';
+$lang['locfiledit_save_bak'] = 'Une copie de sauvegarde du fichier sera créée lors de l\'enregistrement';
+$lang['locfiledit_saved_bak'] = 'Une copie de sauvegarde a été créée (%s)';
+$lang['locfiledit_save_file'] = 'Enregistrer le fichier';
+$lang['locfiledit_choose_file'] = 'Choisissez un fichier à éditer';
+$lang['locfiledit_edit'] = 'Editer';
+$lang['locfiledit_restore'] = 'Charger le fichier de sauvegarde';
+$lang['locfiledit_restore_confirm'] = 'Souaitez-vous charger le fichier de sauvegarde?
+Vous devrez ensuite cliquer sur Enregistrer pour le restaurer.';
+$lang['locfiledit_bak_loaded1'] = 'Fichier de sauvegarde chargé';
+$lang['locfiledit_bak_loaded2'] = 'Vous devez l\'enregistrer pour le sauvegarder.';
+$lang['locfiledit_syntax_error'] = 'Erreur de syntaxe! Impossible d\'enregistrer le fichier.';
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/language/index.php b/BSF/plugins/LocalFilesEditor/language/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/language/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/LocalFilesEditor/main.inc.php b/BSF/plugins/LocalFilesEditor/main.inc.php
new file mode 100644
index 000000000..378c69780
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/main.inc.php
@@ -0,0 +1,46 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: LocalFiles Editor
+Version: 1.8
+Description: Edit local files from administration panel / Editeur de fichiers locaux
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=144
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+define('LOCALEDIT_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+function localfiles_admin_menu($menu)
+{
+ array_push($menu, array(
+ 'NAME' => 'LocalFiles Editor',
+ 'URL' => get_admin_plugin_menu_link(LOCALEDIT_PATH . 'admin.php')));
+ return $menu;
+}
+
+add_event_handler('get_admin_plugin_menu_links', 'localfiles_admin_menu');
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/show_default.php b/BSF/plugins/LocalFilesEditor/show_default.php
new file mode 100644
index 000000000..3a70f258e
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/show_default.php
@@ -0,0 +1,68 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+define('PHPWG_ROOT_PATH', '../../');
+include_once(PHPWG_ROOT_PATH . 'include/common.inc.php');
+include_once(LOCALEDIT_PATH.'functions.inc.php');
+check_status(ACCESS_ADMINISTRATOR);
+
+if (isset($_GET['file']))
+{
+ $path = $_GET['file'];
+ if (!is_admin() or (!substr_count($path, 'config_default.inc.php') and !substr_count($path, '.lang.php')))
+ {
+ die('Hacking attempt!');
+ }
+
+ $template->set_filename('show_default', dirname(__FILE__) . '/show_default.tpl');
+
+ // Editarea
+ if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false)
+ {
+ $editarea = array(
+ 'syntax' => 'php',
+ 'start_highlight' => true,
+ 'is_editable' => false,
+ 'language' => substr($user['language'], 0, 2));
+
+ $template->assign('editarea', array(
+ 'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js',
+ 'OPTIONS' => $editarea));
+ }
+
+ $file = file_get_contents(PHPWG_ROOT_PATH . $path);
+
+ $template->assign(array('DEFAULT_CONTENT' => $file));
+
+ $title = $path;
+ $page['page_banner'] = '<h1>'.str_replace('/', ' / ', $path).'</h1>';
+ $page['body_id'] = 'thePopuphelpPage';
+
+ include(PHPWG_ROOT_PATH.'include/page_header.php');
+
+ $template->pparse('show_default');
+
+ include(PHPWG_ROOT_PATH.'include/page_tail.php');
+}
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/show_default.tpl b/BSF/plugins/LocalFilesEditor/show_default.tpl
new file mode 100644
index 000000000..bccfc9712
--- /dev/null
+++ b/BSF/plugins/LocalFilesEditor/show_default.tpl
@@ -0,0 +1,13 @@
+{if isset($editarea)}
+<script type="text/javascript" src="{$editarea.URL}"></script>
+<script type="text/javascript">
+editAreaLoader.init({ldelim}
+ id: "text"
+ {foreach from=$editarea.OPTIONS key=option item=value}
+ , {$option}: {$value|editarea_quote}
+ {/foreach}
+{rdelim});
+</script>
+{/if}
+
+<textarea rows="30" id="text" cols="90">{$DEFAULT_CONTENT}</textarea> \ No newline at end of file
diff --git a/BSF/plugins/add_index/admin/index.php b/BSF/plugins/add_index/admin/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/admin/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/admin/main_page.php b/BSF/plugins/add_index/admin/main_page.php
new file mode 100644
index 000000000..35193af4e
--- /dev/null
+++ b/BSF/plugins/add_index/admin/main_page.php
@@ -0,0 +1,205 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN)))
+{
+ die('Hacking attempt!');
+}
+
+// +-----------------------------------------------------------------------+
+// | include |
+// +-----------------------------------------------------------------------+
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+// +-----------------------------------------------------------------------+
+// | Functions |
+// +-----------------------------------------------------------------------+
+/**
+ * returns an array containing sub-directories
+ * recursive by default
+ *
+ * directories nammed ".svn" are omitted
+ *
+ * @param string $path
+ * @param bool $recursive
+ * @return array
+ */
+function get_add_index_directories($path, $recursive = true)
+{
+ $dirs = array();
+
+ if (is_dir($path))
+ {
+ if ($contents = opendir($path))
+ {
+ while (($node = readdir($contents)) !== false)
+ {
+ if (
+ is_dir($path.'/'.$node)
+ and $node != '.'
+ and $node != '..'
+ and $node != '.svn'
+ )
+ {
+ array_push($dirs, $path.'/'.$node);
+ if ($recursive)
+ {
+ $dirs = array_merge($dirs, get_add_index_directories($path.'/'.$node));
+ }
+ }
+ }
+ }
+ }
+
+ return $dirs;
+}
+
+// +-----------------------------------------------------------------------+
+// | Main |
+// +-----------------------------------------------------------------------+
+// Compute values
+$index_file_src=$conf['add_index_source_directory_path'].$conf['add_index_filename'];
+$overwrite_file=isset($_GET['overwrite']);
+$site_id = (isset($_GET['site_id']) and is_numeric($_GET['site_id'])
+ ? $_GET['site_id']
+ : 0);
+
+// Init values
+$add_index_results = array();
+$count_copy = 0;
+$count_skip = 0;
+$count_error = 0;
+
+if (@file_exists($index_file_src))
+{
+ $query = '
+select
+ galleries_url
+from
+ '.SITES_TABLE;
+ if (!empty($site_id))
+ {
+ $query .= '
+where
+ id = '.$site_id;
+ }
+ $query .= '
+order by
+ id';
+
+ $result = pwg_query($query);
+
+ if (mysql_num_rows($result) > 0)
+ {
+ while (list($galleries_url) = mysql_fetch_row($result))
+ {
+ if (!url_is_remote($galleries_url))
+ {
+ //echo $galleries_url.'<BR>';
+ foreach (get_add_index_directories($galleries_url) as $dir_galleries)
+ {
+ $file_dest = $dir_galleries.'/'.$conf['add_index_filename'];
+ if ($overwrite_file or !@file_exists($file_dest))
+ {
+ if (copy($index_file_src, $file_dest))
+ {
+ array_push($add_index_results,
+ sprintf(l10n('add_index_file_copied'), $file_dest));
+ $count_copy++;
+ }
+ else
+ {
+ array_push($page['errors'],
+ sprintf(l10n('add_index_file_not_copied'), $file_dest));
+ $count_error++;
+ }
+ }
+ else
+ {
+ $count_skip++;
+ }
+ }
+ }
+ else
+ {
+ if (!empty($site_id))
+ {
+ array_push($page['errors'],
+ sprintf(l10n('add_index_not_local_site'),
+ $galleries_url, $site_id));
+ }
+ }
+ }
+ }
+
+ // Show always an result, defaut (0 copy, $count_copy == $count_skip == 0)
+ if (($count_copy != 0) or ($count_skip == 0))
+ {
+ array_push($add_index_results,
+ l10n_dec('add_index_nb_copied_file', 'add_index_nb_copied_files',
+ $count_copy));
+ }
+ if ($count_skip != 0)
+ {
+ array_push($add_index_results,
+ l10n_dec('add_index_nb_skipped_file', 'add_index_nb_skipped_files',
+ $count_skip));
+ }
+ if ($count_error != 0)
+ {
+ array_push($page['errors'],
+ l10n_dec('add_index_nb_not_copied_file', 'add_index_nb_not_copied_files',
+ $count_error));
+ }
+}
+else
+{
+ array_push($page['errors'],
+ sprintf(l10n('add_index_src_file_dont_exists'), $index_file_src));
+}
+
+// +-----------------------------------------------------------------------+
+// | template initialization |
+// +-----------------------------------------------------------------------+
+$template->set_filenames(array('main_page' => dirname(__FILE__).'/main_page.tpl'));
+
+if (count($add_index_results) != 0)
+{
+ foreach ($add_index_results as $result)
+ {
+ $template->assign_block_vars('add_index_results.result', array('RESULT' => $result));
+ }
+}
+
+// +-----------------------------------------------------------------------+
+// | Sending html code |
+// +-----------------------------------------------------------------------+
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'main_page');
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/admin/main_page.tpl b/BSF/plugins/add_index/admin/main_page.tpl
new file mode 100644
index 000000000..591ff7fc0
--- /dev/null
+++ b/BSF/plugins/add_index/admin/main_page.tpl
@@ -0,0 +1,15 @@
+<!-- DEV TAG: not smarty migrated -->
+<!-- $Id: notification_by_mail.tpl Ruben ARNAUD -->
+<div class="titrePage">
+ <h2>{lang:Add_Index}</h2>
+</div>
+
+<!-- BEGIN add_index_results -->
+<div>
+ <ul>
+ <!-- BEGIN result -->
+ <li>{add_index_results.result.RESULT}</li>
+ <!-- END result -->
+ </ul>
+</div>
+<!-- END add_index_results -->
diff --git a/BSF/plugins/add_index/index.php b/BSF/plugins/add_index/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/en_UK/help/advanced_feature.html b/BSF/plugins/add_index/language/en_UK/help/advanced_feature.html
new file mode 100644
index 000000000..00d15b57c
--- /dev/null
+++ b/BSF/plugins/add_index/language/en_UK/help/advanced_feature.html
@@ -0,0 +1,7 @@
+<p>Functionality of AddIndex plugin:</p>
+<ul>
+ <li>
+ <strong>Add and overwrite "index" files for all local sites:</strong>
+ Overwrite copy the file ./include/index.php to all sub-directories of gallerie local sites.
+ </li>
+<ul>
diff --git a/BSF/plugins/add_index/language/en_UK/help/index.php b/BSF/plugins/add_index/language/en_UK/help/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/en_UK/help/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/en_UK/help/site_manager.html b/BSF/plugins/add_index/language/en_UK/help/site_manager.html
new file mode 100644
index 000000000..353980adc
--- /dev/null
+++ b/BSF/plugins/add_index/language/en_UK/help/site_manager.html
@@ -0,0 +1,7 @@
+<p>Functionality of AddIndex plugin:</p>
+<ul>
+ <li>
+ <strong>Add "index" files for local site:</strong>
+ Copy the file ./include/index.php to all sub-directories of selected local site.
+ </li>
+<ul>
diff --git a/BSF/plugins/add_index/language/en_UK/index.php b/BSF/plugins/add_index/language/en_UK/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/en_UK/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/en_UK/plugin.lang.php b/BSF/plugins/add_index/language/en_UK/plugin.lang.php
new file mode 100644
index 000000000..63c3931ce
--- /dev/null
+++ b/BSF/plugins/add_index/language/en_UK/plugin.lang.php
@@ -0,0 +1,39 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Add "index" files';
+$lang['Advanced_Add_Index'] = 'Add and overwrite "index" files for all local sites';
+$lang['Manager_Add_Index'] = 'add "index"';
+
+$lang['add_index_file_copied'] = '%s copied';
+$lang['add_index_file_not_copied'] = '%s not copied';
+$lang['add_index_not_local_site'] = '%s [%d] is a remote site, it\`s compatible with add "index" files';
+$lang['add_index_nb_copied_file'] = '%d file copied';
+$lang['add_index_nb_copied_files'] = '%d files copied';
+$lang['add_index_nb_skipped_file'] = '%d file skipped';
+$lang['add_index_nb_skipped_files'] = '%d files skipped';
+$lang['add_index_nb_not_copied_file'] = '%d file not copied';
+$lang['add_index_nb_not_copied_files'] = '%d files not copied';
+$lang['add_index_src_file_dont_exists'] = 'Source file %s don\'t esists, cannot duplicate this file';
+
+?>
diff --git a/BSF/plugins/add_index/language/es_ES/help/advanced_feature.html b/BSF/plugins/add_index/language/es_ES/help/advanced_feature.html
new file mode 100644
index 000000000..82734b259
--- /dev/null
+++ b/BSF/plugins/add_index/language/es_ES/help/advanced_feature.html
@@ -0,0 +1,7 @@
+<p>Funcionalidad del plugin AddIndex:</p>
+<ul>
+ <li>
+ <strong>Adición y aplastamiento de los ficheros "index" para todos los sitios locales :</strong>
+ Copia con aplastamiento el fichero ./include/index.php en todos los subficheros de las galerías de los sitios locales.
+ </li>
+</ul>
diff --git a/BSF/plugins/add_index/language/es_ES/help/index.php b/BSF/plugins/add_index/language/es_ES/help/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/es_ES/help/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/es_ES/help/site_manager.html b/BSF/plugins/add_index/language/es_ES/help/site_manager.html
new file mode 100644
index 000000000..c09a6f3c3
--- /dev/null
+++ b/BSF/plugins/add_index/language/es_ES/help/site_manager.html
@@ -0,0 +1,7 @@
+<p>Funcionalidad del plugin AddIndex:</p>
+<ul>
+ <li>
+ <strong>Adición de los ficheros "index" para el sitio local:</strong>
+ Copia el fichero ./include/index.php en todos los subficheros del sitio seleccionado.
+ </li>
+</ul>
diff --git a/BSF/plugins/add_index/language/es_ES/index.php b/BSF/plugins/add_index/language/es_ES/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/es_ES/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/es_ES/plugin.lang.php b/BSF/plugins/add_index/language/es_ES/plugin.lang.php
new file mode 100644
index 000000000..26d104de6
--- /dev/null
+++ b/BSF/plugins/add_index/language/es_ES/plugin.lang.php
@@ -0,0 +1,39 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Adición de los ficheros "index"';
+$lang['Advanced_Add_Index'] = 'Adición y aplastamiento de los ficheros "index" para todos los sitios locales';
+$lang['Manager_Add_Index'] = 'adición de "index"';
+
+$lang['add_index_file_copied'] = '%s copiado';
+$lang['add_index_file_not_copied'] = '%s no copiado';
+$lang['add_index_not_local_site'] = '%s [%d] es un sitio distante, no es compatible con la adición de ficheros "index"';
+$lang['add_index_nb_copied_file'] = '%d fichero copiado';
+$lang['add_index_nb_copied_files'] = '%d ficheros copiados';
+$lang['add_index_nb_skipped_file'] = '%d fichero que debe tratarse';
+$lang['add_index_nb_skipped_files'] = '%d ficheros que deben tratarse';
+$lang['add_index_nb_not_copied_file'] = '%d fichero no copiado';
+$lang['add_index_nb_not_copied_files'] = '%d ficheros no copiados';
+$lang['add_index_src_file_dont_exists'] = 'El fichero fuente no existe, la duplicación de este fichero no es posible';
+
+?>
diff --git a/BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html b/BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html
new file mode 100644
index 000000000..a5bf92e5b
--- /dev/null
+++ b/BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html
@@ -0,0 +1,7 @@
+<p>Fonctionnalité du plugin AddIndex:</p>
+<ul>
+ <li>
+ <strong>Ajout et écrasement des fichiers "index" pour tous les sites locaux :</strong>
+ Copie avec écrasement le fichier ./include/index.php dans tous les sous-répertoires des galeries des sites locaux.
+ </li>
+</ul>
diff --git a/BSF/plugins/add_index/language/fr_FR/help/index.php b/BSF/plugins/add_index/language/fr_FR/help/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/fr_FR/help/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/fr_FR/help/site_manager.html b/BSF/plugins/add_index/language/fr_FR/help/site_manager.html
new file mode 100644
index 000000000..87b6ec15c
--- /dev/null
+++ b/BSF/plugins/add_index/language/fr_FR/help/site_manager.html
@@ -0,0 +1,7 @@
+<p>Fonctionnalité du plugin AddIndex:</p>
+<ul>
+ <li>
+ <strong>Ajout des fichiers "index" pour le site local :</strong>
+ Copie le fichier ./include/index.php dans tous les sous-répertoires du site sélectionné.
+ </li>
+</ul>
diff --git a/BSF/plugins/add_index/language/fr_FR/index.php b/BSF/plugins/add_index/language/fr_FR/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/fr_FR/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/language/fr_FR/plugin.lang.php b/BSF/plugins/add_index/language/fr_FR/plugin.lang.php
new file mode 100644
index 000000000..228ed75af
--- /dev/null
+++ b/BSF/plugins/add_index/language/fr_FR/plugin.lang.php
@@ -0,0 +1,39 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Ajout des fichiers "index"';
+$lang['Advanced_Add_Index'] = 'Ajout et écrasement des fichiers "index" pour tous les sites locaux';
+$lang['Manager_Add_Index'] = 'ajout des "index"';
+
+$lang['add_index_file_copied'] = '%s copié';
+$lang['add_index_file_not_copied'] = '%s non copié';
+$lang['add_index_not_local_site'] = '%s [%d] est un site distant, ce n\'est pas compatible avec l\'ajout de fichiers "index"';
+$lang['add_index_nb_copied_file'] = '%d fichier copié';
+$lang['add_index_nb_copied_files'] = '%d fichiers copiés';
+$lang['add_index_nb_skipped_file'] = '%d fichier à ne pas traiter';
+$lang['add_index_nb_skipped_files'] = '%d fichiers à ne pas traiter';
+$lang['add_index_nb_not_copied_file'] = '%d fichier non copié';
+$lang['add_index_nb_not_copied_files'] = '%d fichiers non copiés';
+$lang['add_index_src_file_dont_exists'] = 'Le fichier source n\'existe pas, la duplication de ce fichier n\'est pas possible';
+
+?>
diff --git a/BSF/plugins/add_index/language/index.php b/BSF/plugins/add_index/language/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/add_index/language/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/add_index/main.admin.inc.php b/BSF/plugins/add_index/main.admin.inc.php
new file mode 100644
index 000000000..f293d30e0
--- /dev/null
+++ b/BSF/plugins/add_index/main.admin.inc.php
@@ -0,0 +1,93 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN)))
+{
+ die('Hacking attempt!');
+}
+
+class AdminAddIndex extends AddIndex
+{
+ function load_params()
+ {
+ global $conf;
+
+ // Name of index file (index.php or index.htm or index.html)
+ if (!isset($conf['add_index_filename']))
+ {
+ $conf['add_index_filename'] = 'index.php';
+ }
+ // Name of index file (index.php or index.htm or index.html)
+ if (!isset($conf['add_index_source_directory_path']))
+ {
+ // Name of the directoty use in order to copy index file
+ $conf['add_index_source_directory_path'] = PHPWG_ROOT_PATH.'include/';
+ }
+ }
+
+ function loading_lang()
+ {
+ load_language('plugin.lang', $this->path);
+ }
+
+ function get_admin_advanced_features_links($advanced_features)
+ {
+ array_push($advanced_features,
+ array
+ (
+ 'CAPTION' => l10n('Advanced_Add_Index'),
+ 'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/main_page.php').'&amp;overwrite'
+ ));
+
+ return $advanced_features;
+ }
+
+ function get_admins_site_links($site_manager_plugin_links, $site_id, $is_remote)
+ {
+ if (!$is_remote)
+ {
+ array_push($site_manager_plugin_links,
+ array
+ (
+ 'U_HREF' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/main_page.php').'&amp;site_id='.$site_id,
+ 'U_CAPTION' => l10n('Manager_Add_Index'),
+ 'U_HINT' => l10n('Add_Index')
+ ));
+ }
+
+ return $site_manager_plugin_links;
+ }
+}
+
+// Create object
+$add_index = new AdminAddIndex();
+
+// Load Add Index parameters
+$add_index->load_params();
+
+// Add events
+add_event_handler('loading_lang', array(&$add_index, 'loading_lang'));
+add_event_handler('get_admin_advanced_features_links', array(&$add_index, 'get_admin_advanced_features_links'));
+add_event_handler('get_admins_site_links', array(&$add_index, 'get_admins_site_links'), EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/main.base.inc.php b/BSF/plugins/add_index/main.base.inc.php
new file mode 100644
index 000000000..765d1cbbf
--- /dev/null
+++ b/BSF/plugins/add_index/main.base.inc.php
@@ -0,0 +1,39 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+class AddIndex
+{
+ var $path;
+
+ function AddIndex()
+ {
+ $this->path = dirname(__FILE__).'/';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/main.inc.php b/BSF/plugins/add_index/main.inc.php
new file mode 100644
index 000000000..30e6b9ff6
--- /dev/null
+++ b/BSF/plugins/add_index/main.inc.php
@@ -0,0 +1,53 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Add Index
+Version: 1.8
+Description: Add file index.php file on all sub-directories of local galleries pictures. / Ajoute le fichier index.php sur les sous-répertoires de galeries d'images locales.
+Plugin URI: http://piwigo.org
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+if (in_array(script_basename(), array('popuphelp', 'admin')))
+{
+ if (defined('IN_ADMIN') and IN_ADMIN)
+ {
+ include_once(dirname(__FILE__).'/'.'main.base.inc.php');
+ include_once(dirname(__FILE__).'/'.'main.admin.inc.php');
+ }
+ else
+ {
+ include_once(dirname(__FILE__).'/'.'main.base.inc.php');
+ include_once(dirname(__FILE__).'/'.'main.normal.inc.php');
+ }
+ set_plugin_data($plugin['id'], $add_index);
+}
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/main.normal.inc.php b/BSF/plugins/add_index/main.normal.inc.php
new file mode 100644
index 000000000..6f43c6e40
--- /dev/null
+++ b/BSF/plugins/add_index/main.normal.inc.php
@@ -0,0 +1,60 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+class NormalAddIndex extends AddIndex
+{
+ function get_popup_help_content($popup_help_content, $page)
+ {
+ if (in_array($page, array('advanced_feature', 'site_manager')))
+ {
+ $help_content =
+ load_language('help/'.$page.'.html', $this->path, '', true);
+ }
+ else
+ {
+ $help_content = false;
+ }
+
+ if ($help_content == false)
+ {
+ return $popup_help_content;
+ }
+ else
+ {
+ return $popup_help_content.$help_content;
+ }
+ }
+}
+
+// Create object
+$add_index = new NormalAddIndex();
+
+// Add events
+add_event_handler('get_popup_help_content', array(&$add_index, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/admin_advices/admin_advices.tpl b/BSF/plugins/admin_advices/admin_advices.tpl
new file mode 100644
index 000000000..b4c7f6169
--- /dev/null
+++ b/BSF/plugins/admin_advices/admin_advices.tpl
@@ -0,0 +1,39 @@
+{if isset($ADVICE_ABOUT)}
+<div class="content">
+ <h2>{'An_advice_about'|@translate} {$ADVICE_ABOUT}</h2>
+ <h3>{$ADVICE_TEXT}</h3>
+ <table summary="Admin advices summary">
+ <tr><td style="text-align: left; width: 50%;">
+ {foreach from=$More item=advice}
+ {$advice}<BR />
+ {/foreach}
+ <br />
+ </td><td style="text-align: right; width: 20%;">
+ {if isset($thumbnail.IMAGE)}
+ <a href="{$thumbnail.U_MODIFY}" title="{'link_info_image'|@translate}">
+ <img class="thumbnail" src="{$thumbnail.IMAGE}"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"></a>
+ </td><td style="text-align: left;">
+ <img src="{$themeconf.icon_dir}/{$thumbnail.NAME}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Name'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.COMMENT}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Description'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.AUTHOR}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Author'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.CREATE_DATE}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Creation date'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.METADATA}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Metadata'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.TAGS}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Tags'|@translate} ({$thumbnail.NUM_TAGS})
+ {/if}
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan=2>{$smarty.now|date_format:"%A, %B %e, %Y - %r"} --- Templates generated by <a href="http://www.smarty.net/" onclick="window.open(this.href, ''); return false;">Smarty</a> {$smarty.version}</td>
+ </tr>
+ </table>
+
+</div>
+{/if} \ No newline at end of file
diff --git a/BSF/plugins/admin_advices/default-layout.css b/BSF/plugins/admin_advices/default-layout.css
new file mode 100644
index 000000000..35f8801f3
--- /dev/null
+++ b/BSF/plugins/admin_advices/default-layout.css
@@ -0,0 +1,19 @@
+.content {
+ list-style-type:none;
+ margin: 0 1em 0 14.5em;
+ padding: 0 0 15px 0;
+}
+.content h2 {
+ font-weight: bold;
+ padding-left: 2em;
+}
+.content h3 {
+ text-align: left;
+ padding-left: 3em;
+ font-size: 120%;
+}
+.content table tr td {
+ text-align: left;
+ padding-left: 2em;
+}
+
diff --git a/BSF/plugins/admin_advices/en_UK/index.php b/BSF/plugins/admin_advices/en_UK/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/admin_advices/en_UK/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/admin_advices/en_UK/lang.adv.php b/BSF/plugins/admin_advices/en_UK/lang.adv.php
new file mode 100644
index 000000000..26dc4d56b
--- /dev/null
+++ b/BSF/plugins/admin_advices/en_UK/lang.adv.php
@@ -0,0 +1,447 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+global $lang;
+$lang['An_advice_about'] = 'A new advice about';
+$lang['Metadata'] = 'Metadata';
+
+foreach ($conf as $key => $value)
+{
+ if ( is_string($value) )
+ {
+ $bool = ($value == 'false') ? false : $value;
+ $bool = ($value == 'true') ? true : $bool;
+ $conf[$key] = $bool;
+ }
+}
+
+//
+// Don't forget to update range for new advices
+//
+$cases = range(1,34);
+srand ((double) microtime() * 10000000);
+shuffle($cases);
+
+$cond = false;
+foreach ($cases as $id_adv)
+{
+ if ($cond) break;
+ $adv = array();
+ switch ($id_adv) {
+ Case 1 :
+ $adv[] = 'Current value: public. ';
+ $adv[] = 'Try $conf[\'newcat_default_status\'] = \'private\';';
+ $adv[] = 'You will have more time to describe and check your pictures.';
+ $adv[] = 'Time to decide between private and public status.';
+ $adv[] = 'If you choose private, time to distribute authorization.';
+ $adv[] = 'Your new category will be well prepared.';
+ $cond = ($conf['newcat_default_status'] !== 'public');
+ $confk = 'newcat_default_status';
+ break;
+
+ Case 2 :
+ $adv[] = 'Current value: ' . (string) $conf['slideshow_period'] . '.';
+ $adv[] = 'This value could be too small for low band connections.';
+ $adv[] = 'Think about higher value like 4.';
+ $cond = ( $conf['slideshow_period'] < 4 );
+ $confk = 'slideshow_period';
+ break;
+
+ Case 3 :
+ $adv[] = 'Current value: ' . implode(', ', $conf['file_ext']) . '. ';
+ $adv[] = 'Should never contains extensions which can be executed';
+ $adv[] = 'on the server side like *.php, *.PHP, *.asp, ...';
+ $cond = ( in_array('php',$conf['file_ext']) );
+ $confk = 'file_ext';
+ break;
+
+ Case 4 :
+ $adv[] = 'Show IPTC Data from your picture:';
+ $adv[] = ' 1 - Copy one of your jpg pictures (a public one)' .
+ ' in ./tools/<br />' .
+ ' 2 - Rename it as sample.jpg.<br />' .
+ ' 3 - Run ./tools/metadata.php<br />' .
+ ' 4 - Analyse results to determine which IPTC fields could be' .
+ ' useful for your visitors.';
+ $adv[] = 'Beginners would prefer to keep $conf[\'show_iptc\'] = false;';
+ $adv[] = 'Advanced users would take care of $lang values and impacts' .
+ ' on templates.';
+ $cond = true;
+ $confk = 'show_iptc_mapping';
+ break;
+
+ Case 5 :
+ $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.';
+ $adv[] = 'This value is maybe too high for low connections, ' .
+ 'think about 25-50 depending on your thumbnail sizes.';
+ $cond = ( $conf['top_number'] > 50 );
+ $confk = 'top_number';
+ break;
+
+ Case 6 :
+ $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.';
+ $adv[] = 'One? It could be too low for random pictures, ' .
+ 'think about 5-10 depending on your thumbnail sizes.';
+ $cond = ( $conf['top_number'] < 2 ) ? true : false;
+ $confk = 'top_number';
+ break;
+
+ Case 7 :
+ $adv[] = 'Current value: ' . (string) $conf['anti-flood_time'] . '.';
+ $adv[] = 'For normal flow processing, your value is probably too high. ' .
+ 'Reasonable value is 60 (default).' ;
+ $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false;
+ $confk = 'anti-flood_time';
+ break;
+
+ Case 8 :
+ $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.';
+ $adv[] = 'Authorized values are ' .
+ "'date_creation' or 'date_available'" .
+ ', otherwise you can get unpredictable results.' ;
+ $cond = ( !in_array($conf['calendar_datefield'],
+ array('date_creation','date_available')) );
+ $confk = 'calendar_datefield';
+ break;
+
+ Case 9 :
+ // If (iptc or exif) are used and date_creation is updated
+ // Then it's Ok, you can use date_creation by default for calendar
+ // else ... Advice
+ $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.';
+ $adv[] = "'date_creation'" . ' is NOT filled by ' .
+ 'any activated use metadata mapping fields.';
+ $adv[] = 'So activate metadata usage <strong>or</strong> change to ' .
+ '$conf[\'calendar_datefield\'] = \'date_available\'';
+ $adv[] = 'Activate metadata usage as you want: <br />' .
+ '1 - $conf[\'use_iptc\'] = true; or $conf[\'use_exif\'] = true; ' .
+ 'each way will be correct.<br />' .
+ '2 - And respectively map:<br />' .
+ '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' ' .
+ '=> \'2#055\', ...<br />' .
+ 'or/and:<br />' .
+ '$conf[\'use_exif_mapping\'] = array(\'date_creation\' ' .
+ '=> \'DateTimeOriginal\', ...<br />' .
+ '3 - Finally, a new task is up to you: Metadata synchronization.' ;
+ $cond2 = ( $conf['use_exif'] and
+ isset($conf['use_exif_mapping']['date_creation']) );
+ $cond3 = ( $conf['use_iptc'] and
+ isset($conf['use_iptc_mapping']['date_creation']) );
+ $cond = ( $conf['calendar_datefield'] == 'date_creation' );
+ $cond = ( ($cond2 or $cond3) and $cond ) ? false : true;
+ $confk = 'calendar_datefield';
+ break;
+
+ Case 10 :
+ $adv[] = 'Current value: false.';
+ $adv[] = 'Not useful, private status is better, so code ' .
+ '$conf[\'newcat_default_visible\'] = true;' ;
+ $cond = !$conf['newcat_default_visible'];
+ $confk = 'newcat_default_visible';
+ break;
+
+ Case 11 :
+ $adv[] = 'Current value: ' . (string) $conf['level_separator'] . '.';
+ $adv[] = 'Try something else like $conf[\'level_separator\'] = \'+ \';';
+ $cond = ( $conf['level_separator'] == ' / ' );
+ $confk = 'level_separator';
+ break;
+
+ Case 12 :
+ $adv[] = 'Current value: ' . (string) $conf['paginate_pages_around'] . '.';
+ $adv[] = 'Usual range is between 2 and 5. To be light, choose ' .
+ '$conf[\'paginate_pages_around\'] = 2; <br />' .
+ 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7;';
+ $cond = (($conf['paginate_pages_around'] < 2)
+ or ($conf['paginate_pages_around'] > 12));
+ $confk = 'paginate_pages_around';
+ break;
+
+ Case 13 :
+ $adv[] = 'Current value: ' . (string) $conf['tn_width'] . '.';
+ $adv[] = 'Should be a close value to your thumbnail width.' .
+ $adv[] = 'Usual range is between 96 and 150, ' .
+ 'about $conf[\'tn_width\'] = 128;';
+ $cond = (($conf['tn_width'] < 66)
+ or ($conf['tn_width'] > 180));
+ $confk = 'tn_width';
+ break;
+
+ Case 14 :
+ $adv[] = 'Current value: ' . (string) $conf['tn_height'] . '.';
+ $adv[] = 'Should be a close value to your thumbnail height.' .
+ $adv[] = 'Usual range is between 96 and 150, ' .
+ 'about $conf[\'tn_height\'] = 128;';
+ $cond = (($conf['tn_height'] < 66)
+ or ($conf['tn_height'] > 180));
+ $confk = 'tn_height';
+ break;
+
+ Case 15 :
+ $adv[] = 'Thumbnail height and width have to be equal.';
+ $adv[] = 'Choose $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] .
+ ';<br />' .
+ 'or $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';';
+ $cond = ( $conf['tn_height'] !== $conf['tn_width'] );
+ $confk = 'tn_height';
+ break;
+
+ Case 16 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'For security reason, please set ' .
+ '$conf[\'show_version\'] = false;';
+ $cond = $conf['show_version'];
+ $confk = 'show_version';
+ break;
+
+ Case 17 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'For a lighter gallery just have a look to ' .
+ '$conf[\'show_thumbnail_caption\'] = false;';
+ $cond = $conf['show_thumbnail_caption'];
+ $confk = 'show_thumbnail_caption';
+ break;
+
+ Case 18 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'For a lighter gallery just have a look to ' .
+ '$conf[\'show_picture_name_on_title\'] = false;';
+ $cond = $conf['show_picture_name_on_title'];
+ $confk = 'show_picture_name_on_title';
+ break;
+
+ Case 19 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'If you do NOT have any category descriptions just have ' .
+ 'a look to $conf[\'subcatify\'] = false;';
+ $cond = $conf['subcatify'];
+ $confk = 'subcatify';
+ break;
+
+ Case 20 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'Leave $conf[\'allow_random_representative\'] = true; <br />' .
+ 'but analyze if you can avoid for performance reasons.' ;
+ $cond = $conf['allow_random_representative'];
+ $confk = 'allow_random_representative';
+ break;
+
+ Case 21 :
+ $adv[] = 'Current value: ' . (string) $conf['prefix_thumbnail'] . '.';
+ $adv[] = 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.';
+ $adv[] = 'Do NOT change it except if your thumbnails are NOT visible.';
+ $adv[] = 'Distant site may use a different prefix but ' .
+ 'create_listing_file.php must be modified.<br />' .
+ 'You will get a warning message during synchronization in ' .
+ 'that case.';
+ $adv[] = 'Try to keep the same prefix thru all your sites either ' .
+ 'local or distants.';
+ $adv[] = 'Keep this parameter in your ./include/config_'.
+ '<strong>local.inc.php</strong>. <br />'.
+ 'See our wiki configuration page for more information about ' .
+ './include/config_<strong>local.inc.php</strong>.';
+ $cond = ( $conf['prefix_thumbnail'] !== 'TN-' );
+ $confk = 'prefix_thumbnail';
+ break;
+
+ Case 22 :
+ $adv[] = 'Current value: ' . (string) $conf['users_page'] . '.';
+ $adv[] = 'Unless you have a low band connection, you can draw up ' .
+ '$conf[\'users_page\'] to a higher value ' .
+ 'if you have more than 20 members.';
+ $cond = ( $conf['users_page'] < 21 );
+ $confk = 'users_page';
+ break;
+
+ Case 23 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'Should be false, only few webmasters have to set ' .
+ '$conf[\'mail_options\'] = true; <br />' .
+ 'A specific advice you can get from an advanced ' .
+ 'user on our forum in some mailing issues.' ;
+ $cond = $conf['mail_options'];
+ $confk = 'mail_options';
+ break;
+
+ Case 24 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'Should be false, only PWG dev Team have to set ' .
+ '$conf[\'check_upgrade_feed\'] = true; for test purpose.' ;
+ $cond = $conf['check_upgrade_feed'];
+ $confk = 'check_upgrade_feed';
+ break;
+
+ Case 25 :
+ $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
+ . 'items.';
+ $adv[] = 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.';
+ $cond = ( count($conf['rate_items']) < 4 );
+ $confk = 'rate_items';
+ break;
+
+ Case 26 :
+ $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
+ . 'items.';
+ $adv[] = 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.';
+ $adv[] = 'Check your best rated pictures prior to remove some values.' .
+ '<br />Reduce excessive rating and change your ' .
+ '$conf[\'rate_items\'].';
+ $cond = ( count($conf['rate_items']) > 6 );
+ $confk = 'rate_items';
+ break;
+
+ Case 27 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'Could be true, think about $conf[\'show_iptc\'] = false;'
+ . '<br />Some Professional photographers choose false ' .
+ 'their reasons are not really professional.' ;
+ $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' .
+ '<strong>use</strong>_iptc (have a look on metadata page ' .
+ 'on our wiki).';
+ $cond = $conf['show_iptc'];
+ $confk = 'show_iptc';
+ break;
+
+ Case 28 :
+ $adv[] = 'Current value: true.';
+ $adv[] = 'Documentalists and professionnal photographers would ' .
+ 'set it true, but beginners should leave it ' .
+ 'as $conf[\'use_iptc\'] = false;';
+ $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
+ '<br />Mentionned fields would be rewrited with IPTC values ' .
+ ' even those ones are NOT empty.';
+ $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' .
+ '<strong>use</strong>_iptc (have a look on metadata page ' .
+ 'on our wiki).';
+ $cond = $conf['use_iptc'];
+ $confk = 'use_iptc';
+ break;
+
+ Case 29 :
+ $adv[] = 'How to deal with IPTC:';
+ $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
+ '<br />2 - Rename it as sample.jpg.' .
+ '<br />3 - Run ./tools/metadata.php' .
+ '<br />4 - Analyse results to determine which IPTC fields ' .
+ 'could be used to override database fields.';
+ $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;';
+ $adv[] = 'Advanced users make documentation efforts prior ' .
+ 'to upload their pictures.<br />' .
+ 'IPTC fields have to be described in ' .
+ '$conf[\'use_iptc_mapping\']';
+ $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' .
+ '<strong>use</strong>_iptc_mapping must be totally different.';
+ $cond = true;
+ $confk = 'use_iptc';
+ break;
+
+ Case 30 :
+ $adv[] = 'How to deal with IPTC:';
+ $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
+ '<br />2 - Rename it as sample.jpg.' .
+ '<br />3 - Run ./tools/metadata.php' .
+ '<br />4 - Analyse results to determine which IPTC fields ' .
+ 'could be used to override database fields.';
+ $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;';
+ $adv[] = 'Advanced users make documentation efforts prior ' .
+ 'to upload their pictures.';
+ $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
+ '<br />Mentionned fields would be rewrited with IPTC values ' .
+ ' even those ones are NOT empty.';
+ $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' .
+ '<strong>use</strong>_iptc_mapping must be totally different.';
+ $cond = true;
+ $confk = 'use_iptc_mapping';
+ break;
+
+ Case 31 :
+ $adv[] = 'Current value: ' . ( ( $conf['show_exif'] ) ? 'true':'false' )
+ . '.';
+ $adv[] = 'Should be true, some information from your camera ' .
+ 'can be displayed.';
+ $adv[] = 'Think about EXIF information could be different depending ' .
+ 'on camera models.<br />' .
+ 'If you change your camera these fields could be ' .
+ 'partly different.';
+ $adv[] = 'Many professional photographers choose false, ' .
+ 'their reasons are to protect their knowledge.' ;
+ $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' .
+ '<strong>use</strong>_exif (have a look on metadata page ' .
+ 'on our wiki).';
+ $cond = true;
+ $confk = 'show_exif';
+ break;
+
+ Case 32 :
+ $adv[] = 'How to deal with EXIF:';
+ $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
+ '<br />2 - Rename it as sample.jpg.' .
+ '<br />3 - Run ./tools/metadata.php' .
+ '<br />4 - Analyse results to determine which EXIF fields ' .
+ 'could be used to override database fields.';
+ $adv[] = 'Beginners would prefer to let default values.';
+ $adv[] = 'Advanced users would take care of $lang values and ' .
+ 'impacts on templates.';
+ $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' .
+ '<strong>use</strong>_exif_mapping must be totally different.';
+ $cond = true;
+ $confk = 'show_exif_fields';
+ break;
+
+ Case 33 :
+ $adv[] = 'Current value: ' . ( ( $conf['use_exif'] ) ? 'true':'false' )
+ . '.';
+ $adv[] = 'Documentalists and professionnal photographers would ' .
+ 'set it true, but beginners should leave the default value.';
+ $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
+ '<br />Mentionned fields would be rewrited with EXIF values ' .
+ ' even those ones are NOT empty.';
+ $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' .
+ '<strong>use</strong>_exif (have a look on metadata page ' .
+ 'on our wiki).';
+ $cond = true;
+ $confk = 'use_exif';
+ break;
+
+ Case 34 :
+ $adv[] = 'How to deal with EXIF:';
+ $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
+ '<br />2 - Rename it as sample.jpg.' .
+ '<br />3 - Run ./tools/metadata.php' .
+ '<br />4 - Analyse results to determine which EXIF fields ' .
+ 'could be used to override database fields.';
+ $adv[] = 'Beginners would prefer to let default values.';
+ $adv[] = 'Advanced users would carefully chose overrided fields ' .
+ 'prior to synchronize.';
+ $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
+ '<br />Mentionned fields would be rewrited with EXIF values ' .
+ ' even those ones are NOT empty.';
+ $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' .
+ '<strong>use</strong>_exif_mapping must be totally different.';
+ $cond = true;
+ $confk = 'use_exif_mapping';
+ break;
+ }
+}
+
+?>
diff --git a/BSF/plugins/admin_advices/fr_FR/index.php b/BSF/plugins/admin_advices/fr_FR/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/admin_advices/fr_FR/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/admin_advices/fr_FR/lang.adv.php b/BSF/plugins/admin_advices/fr_FR/lang.adv.php
new file mode 100644
index 000000000..11fd5cf53
--- /dev/null
+++ b/BSF/plugins/admin_advices/fr_FR/lang.adv.php
@@ -0,0 +1,480 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+global $lang;
+$lang['An_advice_about'] = 'Un nouveau conseil à propos de ';
+$lang['Metadata'] = 'Méta-données';
+
+foreach ($conf as $key => $value)
+{
+ if ( is_string($value) )
+ {
+ $bool = ($value == 'false') ? false : $value;
+ $bool = ($value == 'true') ? true : $bool;
+ $conf[$key] = $bool;
+ }
+}
+
+//
+// Don't forget to update range for new advices
+//
+$cases = range(1,34);
+srand ((double) microtime() * 10000000);
+shuffle($cases);
+
+$cond = false;
+foreach ($cases as $id_adv)
+{
+ if ($cond) break;
+ $adv = array();
+ switch ($id_adv) {
+ Case 1 :
+ $adv[] = 'Valeur actuelle : public. ';
+ $adv[] = 'Essayez $conf[\'newcat_default_status\'] = \'private\';';
+ $adv[] = 'Vous aurez plus de temps pour décrire et contrôler vos images. '
+ . 'Du temps pour vous décider entre un statut privé ou public.';
+ $adv[] = 'Si vous choisissez de rester privé, vous passerez directement '
+ . 'à l\'attribution des autorisations. <br />'
+ . 'Vos nouvelles catégories seront préparées plus facilement.';
+ $cond = ($conf['newcat_default_status'] !== 'public');
+ $confk = 'newcat_default_status';
+ break;
+
+ Case 2 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['slideshow_period'] . '.';
+ $adv[] = 'Ce délai pourrait être trop petit pour les connexions '
+ . 'en bas débit.';
+ $adv[] = 'Pensez à une valeur supérieure comme 4.';
+ $cond = ( $conf['slideshow_period'] < 4 );
+ $confk = 'slideshow_period';
+ break;
+
+ Case 3 :
+ $adv[] = 'Valeur actuelle : ' . implode(', ', $conf['file_ext']) . '. ';
+ $adv[] = 'Ne devrait jamais contenir des extensions pouvant être ';
+ $adv[] = 'exécutées sur le serveur comme *.php, *.PHP, *.asp, ...';
+ $cond = ( in_array('php',$conf['file_ext']) );
+ $confk = 'file_ext';
+ break;
+
+ Case 4 :
+ $adv[] = 'Comment gérer les IPTC:';
+ $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
+ . ' 2 - Renommez celle-ci en sample.jpg.<br />'
+ . ' 3 - Lancez ./tools/metadata.php<br />'
+ . ' 4 - Analysez les résultats pour déterminer quels champs '
+ . 'IPTC pourraient intéresser vos visiteurs.';
+ $adv[] = 'Les débutants laisseront $conf[\'show_iptc\'] = false;';
+ $adv[] = 'Les utilisateurs avancés penseront aux valeurs du tableau '
+ . '$lang; voire même à l\'impact possible sur les templates.';
+ $cond = true;
+ $confk = 'show_iptc_mapping';
+ break;
+
+ Case 5 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.';
+ $adv[] = 'Cette valeur pourrait être trop grande pour des connexions '
+ . 'bas débit.<br /> Pensez à une valeur située entre 25-50 '
+ . 'en fonction de la taille de vos minitures.';
+ $cond = ( $conf['top_number'] > 50 );
+ $confk = 'top_number';
+ break;
+
+ Case 6 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.';
+ $adv[] = 'Une seule? Au moins pour les images aléatoires, pensez '
+ . 'autour de 5-10 selon la tailles de vos miniatures.';
+ $cond = ( $conf['top_number'] < 2 ) ? true : false;
+ $confk = 'top_number';
+ break;
+
+ Case 7 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['anti-flood_time'] . '.';
+ $adv[] = 'Pour un traitement fluide, votre valeur est sans doute trop '
+ . 'grande. Une valeur raisonnable serait 60 (valeur par défaut).' ;
+ $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false;
+ $confk = 'anti-flood_time';
+ break;
+
+ Case 8 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.';
+ $adv[] = 'Les valeurs admises sont '
+ . "'date_creation' ou 'date_available'" . ', toute autre valeur'
+ . 'peut aboutir à des résultats imprévisibles.' ;
+ $cond = ( !in_array($conf['calendar_datefield'],
+ array('date_creation','date_available')) );
+ $confk = 'calendar_datefield';
+ break;
+
+ Case 9 :
+ // If (iptc or exif) are used and date_creation is updated
+ // Then it's Ok, you can use date_creation by default for calendar
+ // else ... Advise
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.';
+ $adv[] = "La 'date_creation'" . ' n\'est pas renseignée. Aucun champ '
+ . 'des méta-données (use_) n\'actualise la base.';
+ $adv[] = 'Soit vous activez l\'usage des méta-données <strong>ou'
+ . '</strong> changez pour '
+ . '$conf[\'calendar_datefield\'] = \'date_available\'';
+ $adv[] = 'Activez l\'usage des méta-données simplement par: <br />'
+ . '1 - $conf[\'use_iptc\'] = true; ou $conf[\'use_exif\'] = true; '
+ . 'au choix, les 2 sont valables.<br />'
+ . '2 - Respectivement à chacune faire la modif:<br />'
+ . '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' '
+ . '=> \'2#055\', ...<br />'
+ . 'et/ou:<br />'
+ . '$conf[\'use_exif_mapping\'] = array(\'date_creation\' '
+ . '=> \'DateTimeOriginal\', ...<br />'
+ . '3 - Enfin une nouvelle tache vous est destinée: '
+ . 'la synchronisation des méta-données.' ;
+ $cond2 = ( $conf['use_exif'] and
+ isset($conf['use_exif_mapping']['date_creation']) );
+ $cond3 = ( $conf['use_iptc'] and
+ isset($conf['use_iptc_mapping']['date_creation']) );
+ $cond = ( $conf['calendar_datefield'] == 'date_creation' );
+ $cond = ( ($cond2 or $cond3) and $cond ) ? false : true;
+ $confk = 'calendar_datefield';
+ break;
+
+ Case 10 :
+ $adv[] = 'Valeur actuelle : false.';
+ $adv[] = 'C\'est une erreur, un statut "private" est plus simple, '
+ . 'alors choisissez $conf[\'newcat_default_visible\'] = true;' ;
+ $cond = !$conf['newcat_default_visible'];
+ $confk = 'newcat_default_visible';
+ break;
+
+ Case 11 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['level_separator'] . '.';
+ $adv[] = 'Vous pouvez toujours essayer un autre séparateur comme :'
+ . '<br />$conf[\'level_separator\'] = \'+ \';';
+ $cond = ( $conf['level_separator'] == ' / ' );
+ $confk = 'level_separator';
+ break;
+
+ Case 12 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['paginate_pages_around']
+ . '.';
+ $adv[] = 'Les valeurs habituelles se situent entre 2 et 5.'
+ . 'Pour un site avec une interface légère, on choisira : <br />'
+ . '$conf[\'paginate_pages_around\'] = 2; <br />'
+ . 'Afin de proposer plus d\'accès directs, on choisira : <br />'
+ . '$conf[\'paginate_pages_around\'] = 7;';
+ $cond = (($conf['paginate_pages_around'] < 2)
+ or ($conf['paginate_pages_around'] > 12));
+ $confk = 'paginate_pages_around';
+ break;
+
+ Case 13 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['tn_width'] . '.';
+ $adv[] = 'Doit être une valeur proche de la largeur de vos miniatures.';
+ $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, '
+ . 'comme $conf[\'tn_width\'] = 128;';
+ $cond = (($conf['tn_width'] < 66)
+ or ($conf['tn_width'] > 180));
+ $confk = 'tn_width';
+ break;
+
+ Case 14 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['tn_height'] . '.';
+ $adv[] = 'Doit être une valeur proche de la hauteur de vos miniatures.';
+ $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, '
+ . 'comme $conf[\'tn_height\'] = 128;';
+ $cond = (($conf['tn_height'] < 66)
+ or ($conf['tn_height'] > 180));
+ $confk = 'tn_height';
+ break;
+
+ Case 15 :
+ $adv[] = 'Il n\'y a aucune raison pour que la largeur maximale soit '
+ . 'différente de la hauteur maximale. Pourquoi les ajouts en '
+ . 'portrait afficheraient des miniatures dans une résolution '
+ . 'différente de celle des miniatures en paysage?';
+ $adv[] = 'Essayez $conf[\'tn_height\'] = ' . (string) $conf['tn_width']
+ . ';<br />'
+ . 'ou $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';';
+ $cond = ( $conf['tn_height'] !== $conf['tn_width'] );
+ $confk = 'tn_height';
+ break;
+
+ Case 16 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Pour des raisons de sécurité de votre galerie, préférez '
+ . '$conf[\'show_version\'] = false;';
+ $cond = $conf['show_version'];
+ $confk = 'show_version';
+ break;
+
+ Case 17 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Pour une galerie moins chargée, faites le test de '
+ . '$conf[\'show_thumbnail_caption\'] = false;';
+ $cond = $conf['show_thumbnail_caption'];
+ $confk = 'show_thumbnail_caption';
+ break;
+
+ Case 18 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Pour une galerie moins chargée, faites le test de '
+ . '$conf[\'show_picture_name_on_title\'] = false;';
+ $cond = $conf['show_picture_name_on_title'];
+ $confk = 'show_picture_name_on_title';
+ break;
+
+ Case 19 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Aucune de vos catégories ne possède de descriptions alors '
+ . 'essayez $conf[\'subcatify\'] = false;';
+ $cond = $conf['subcatify'];
+ $confk = 'subcatify';
+ break;
+
+ Case 20 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Laissez $conf[\'allow_random_representative\'] = true; <br />'
+ . 'mais étudiez comment vous pouvez l\'éviter pour des raisons '
+ . 'de performance.' ;
+ $cond = $conf['allow_random_representative'];
+ $confk = 'allow_random_representative';
+ break;
+
+ Case 21 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['prefix_thumbnail'] . '.';
+ $adv[] = 'Attention, votre $conf[\'prefix_thumbnail\'] n\'est pas '
+ . 'standard.';
+ $adv[] = 'Ne pas changer votre préfixe sauf si vos miniatures ont un '
+ . 'problème d\'affichage.';
+ $adv[] = 'Un site distant peut avoir un préfixe différent, le '
+ . 'create_listing_file.php devra être modifié.<br />'
+ . 'Vous devriez avoir un message d\'avertissement pendant la '
+ . 'synchronisation dans ce cas.';
+ $adv[] = 'Essayez de garder le même préfixe de miniatures pour les sites '
+ . 'locaux ou distants.';
+ $adv[] = 'Conservez ce paramètre dans votre ./include/config_'
+ . '<strong>local.inc.php</strong>. <br />'
+ . 'Voir la page sur la configuration dans le Wiki pour plus '
+ . 'd\'informations à propos de '
+ . './include/config_<strong>local.inc.php</strong>.';
+ $cond = ( $conf['prefix_thumbnail'] !== 'TN-' );
+ $confk = 'prefix_thumbnail';
+ break;
+
+ Case 22 :
+ $adv[] = 'Valeur actuelle : ' . (string) $conf['users_page'] . '.';
+ $adv[] = 'A moins d\'avoir une connexion bas débit, vous pouvez '
+ . 'augmenter largement $conf[\'users_page\'] '
+ . 'surtout si vous avez plus de 20 membres.';
+ $cond = ( $conf['users_page'] < 21 );
+ $confk = 'users_page';
+ break;
+
+ Case 23 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Devrait être à false, seulement quelques webmasters devront '
+ . 'indiquer $conf[\'mail_options\'] = true; <br />'
+ . 'Un utilisateur avancé de notre forum les aura conseillé '
+ . 'dans un seul cas de problème d\'email.' ;
+ $cond = $conf['mail_options'];
+ $confk = 'mail_options';
+ break;
+
+ Case 24 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Devrait être à false, seuls les membres de l\'équipe PWG '
+ . 'codent $conf[\'check_upgrade_feed\'] = true; pour leurs tests.';
+ $cond = $conf['check_upgrade_feed'];
+ $confk = 'check_upgrade_feed';
+ break;
+
+ Case 25 :
+ $adv[] = '$conf[\'rate_items\'] dispose de ' . count($conf['rate_items'])
+ . 'éléments.';
+ $adv[] = 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 éléments '
+ . 'mais pas moins.';
+ $cond = ( count($conf['rate_items']) < 4 );
+ $confk = 'rate_items';
+ break;
+
+ Case 26 :
+ $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
+ . 'items.';
+ $adv[] = 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 éléments '
+ . 'mais pas plus.';
+ $adv[] = 'Contrôlez vos images les mieux notées avant de retirer '
+ . ' certaines valeurs.'
+ . '<br />Réduire les valeurs excessives et modifiez votre '
+ . '$conf[\'rate_items\'].';
+ $cond = ( count($conf['rate_items']) > 6 );
+ $confk = 'rate_items';
+ break;
+
+ Case 27 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Peut être effectivement à true, éventuellement choisissez '
+ . '$conf[\'show_iptc\'] = false;'
+ . '<br />Comme quelques photographes professionnels choisissez '
+ . 'false bien que leurs raisons ne soient guère professionnelles.';
+ $adv[] = 'Ne confondez pas <strong>show</strong>_iptc et '
+ . '<strong>use</strong>_iptc (consultez la pages de métadonnées '
+ . 'sur notre wiki).';
+ $cond = $conf['show_iptc'];
+ $confk = 'show_iptc';
+ break;
+
+ Case 28 :
+ $adv[] = 'Valeur actuelle : true.';
+ $adv[] = 'Les documentalistes et photographes professionnels choisiront '
+ . 'cette valeur true, mais les débutants devraient laisser '
+ . '$conf[\'use_iptc\'] = false;';
+ $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation '
+ . 'des métadonnées.<br />Les champs indiqués pourront être '
+ . 'écrasés par des valeurs de champs IPTC quand bien même ces '
+ . 'champs ne seraient pas vides.';
+ $adv[] = 'Ne confondez pas <strong>show</strong>_iptc et '
+ . '<strong>use</strong>_iptc (consultez la pages de métadonnées '
+ . 'sur notre wiki).';
+ $cond = $conf['use_iptc'];
+ $confk = 'use_iptc';
+ break;
+
+ Case 29 :
+ $adv[] = 'Comment gérer les IPTC:';
+ $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
+ . ' 2 - Renommez celle-ci en sample.jpg.<br />'
+ . ' 3 - Lancez ./tools/metadata.php<br />'
+ . ' 4 - Analysez les résultats pour déterminer quels champs '
+ . 'IPTC pourraient intéresser vos visiteurs.';
+ $adv[] = 'Les débutants laisseront $conf[\'use_iptc\'] = false;';
+ $adv[] = 'Les utilisateurs avancés feront des efforts de documentation '
+ . 'avant de transférer leurs images.<br />'
+ . 'Les champs IPTC doivent être décrits par '
+ . '$conf[\'use_iptc_mapping\']';
+ $adv[] = 'Dans tous les cas, <strong>show</strong>_iptc_mapping et '
+ . '<strong>use</strong>_iptc_mapping seront '
+ . 'totalement différents.';
+ $cond = true;
+ $confk = 'use_iptc';
+ break;
+
+ Case 30 :
+ $adv[] = 'Comment gérer les IPTC:';
+ $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
+ . ' 2 - Renommez celle-ci en sample.jpg.<br />'
+ . ' 3 - Lancez ./tools/metadata.php<br />'
+ . ' 4 - Analysez les résultats pour déterminer quels champs '
+ . 'IPTC pourraient intéresser vos visiteurs.';
+ $adv[] = 'Les débutants laisseront $conf[\'use_iptc\'] = false;';
+ $adv[] = 'Les utilisateurs avancés feront des efforts de documentation '
+ . 'avant de transférer leurs images.<br />'
+ . 'Les champs IPTC doivent être décrits par '
+ . '$conf[\'use_iptc_mapping\']';
+ $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation '
+ . 'des métadonnées.<br />Les champs indiqués pourront être '
+ . 'écrasés par des valeurs de champs IPTC quand bien même ces '
+ . 'champs ne seraient pas vides.';
+ $adv[] = 'Dans tous les cas, <strong>show</strong>_iptc_mapping et '
+ . '<strong>use</strong>_iptc_mapping seront '
+ . 'totalement différents.';
+ $cond = true;
+ $confk = 'use_iptc_mapping';
+ break;
+
+ Case 31 :
+ $adv[] = 'Valeur actuelle : '
+ . ( ( $conf['show_exif'] ) ? 'true':'false' ) . '.';
+ $adv[] = 'Devrait être à true, certaines informations propres à votre '
+ . 'appareil pourront être affichées.';
+ $adv[] = 'Pensez au fait que les informations EXIF peuvent être '
+ . 'différentes suivant les modèles d\'appareil.<br />'
+ . 'Si vous changez votre appareil ces champs pourraient en '
+ . 'partie differents.';
+ $adv[] = 'Beaucoup de photographes professionnels choissent false, '
+ . 'ceci afin de protéger leur savoir-faire.' ;
+ $adv[] = 'Ne confondez pas <strong>show</strong>_exif et '
+ . '<strong>use</strong>_exif (consultez la pages de métadonnées '
+ . 'sur notre wiki).';
+ $cond = true;
+ $confk = 'show_exif';
+ break;
+
+ Case 32 :
+ $adv[] = 'Comment gérer les EXIF:';
+ $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
+ . ' 2 - Renommez celle-ci en sample.jpg.<br />'
+ . ' 3 - Lancez ./tools/metadata.php<br />'
+ . ' 4 - Analysez les résultats pour déterminer quels champs '
+ . 'EXIF pourraient intéresser vos visiteurs.';
+ $adv[] = 'Les débutants laisseront la valeur par défaut.';
+ $adv[] = 'Les utilisateurs avancés penseront aux valeurs du tableau '
+ . '$lang; voire même à l\'impact possible sur les templates.';
+ $adv[] = 'Dans tous les cas, <strong>show</strong>_exif_fields et '
+ . '<strong>use</strong>_exif_mapping seront '
+ . 'totalement différents.';
+ $cond = true;
+ $confk = 'show_exif_fields';
+ break;
+
+ Case 33 :
+ $adv[] = 'Valeur actuelle : ' . ( ( $conf['use_exif'] ) ? 'true':'false' )
+ . '.';
+ $adv[] = 'Les documentalistes et photographes professionnels choisiront '
+ . 'cette valeur true, mais les débutants devraient laisser '
+ . 'la valeur par défaut.';
+ $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation '
+ . 'des métadonnées.<br />Les champs indiqués pourront être '
+ . 'écrasés par des valeurs de champs EXIF quand bien même ces '
+ . 'champs ne seraient pas vides.';
+ $adv[] = 'Ne confondez pas <strong>show</strong>_exif et '
+ . '<strong>use</strong>_exif (consultez la pages de métadonnées '
+ . 'sur notre wiki).';
+ $cond = true;
+ $confk = 'use_exif';
+ break;
+
+ Case 34 :
+ $adv[] = 'Comment gérer les EXIF:';
+ $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
+ . ' 2 - Renommez celle-ci en sample.jpg.<br />'
+ . ' 3 - Lancez ./tools/metadata.php<br />'
+ . ' 4 - Analysez les résultats pour déterminer quels champs '
+ . 'EXIF pourraient intéresser vos visiteurs.';
+ $adv[] = 'Les débutants laisseront la valeur par défaut.';
+ $adv[] = 'Les utilisateurs avancés penseront aux valeurs du tableau '
+ . '$lang; voire même à l\'impact possible sur les templates.';
+ $adv[] = 'Les débutants laisseront $conf[\'use_exif\'] = false;';
+ $adv[] = 'Les utilisateurs avancés feront très attention aux champs '
+ . 'sélectionnés et modifiés par la synchronisation.';
+ $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation '
+ . 'des métadonnées.<br />Ces champs pourront être '
+ . 'écrasés par des valeurs de champs EXIF quand bien même ces '
+ . 'champs ne seraient pas vides.';
+ $adv[] = 'Dans tous les cas, <strong>show</strong>_exif_fields et '
+ . '<strong>use</strong>_exif_mapping seront '
+ . 'totalement différents.';
+ $cond = true;
+ $confk = 'use_exif_mapping';
+ break;
+ }
+}
+
+?>
diff --git a/BSF/plugins/admin_advices/index.php b/BSF/plugins/admin_advices/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/admin_advices/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/admin_advices/main.inc.php b/BSF/plugins/admin_advices/main.inc.php
new file mode 100644
index 000000000..fe87cc723
--- /dev/null
+++ b/BSF/plugins/admin_advices/main.inc.php
@@ -0,0 +1,127 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Admin Advices
+Version: 1.8
+Description: Give you an advice on the administration page.
+Plugin URI: http://piwigo.org
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+add_event_handler('loc_end_page_header', 'set_admin_advice_add_css' );
+
+// Add a XHTML tag in HEAD section
+function set_admin_advice_add_css()
+{
+ global $template, $page;
+ if ( isset($page['body_id']) and $page['body_id']=='theAdminPage'
+ and $page['page'] == 'intro'
+ )
+ {// This Plugin works only on the Admin page
+ $template->append(
+ 'head_elements',
+ '<link rel="stylesheet" type="text/css" '
+ . 'href="'.PHPWG_PLUGINS_PATH.'admin_advices/default-layout.css">'
+ );
+ add_event_handler('loc_begin_page_tail', 'set_admin_advice' );
+ }
+}
+
+// Build an advice on the Admin Intro page
+function set_admin_advice()
+{
+ global $page, $user, $template, $conf;
+
+// Setup Advice Language (Maybe there is already a variable)
+ $advlang = ( isset($user['language']) ) ?
+ $user['language'] : get_default_language(); // en_UK
+ $my_path = dirname(__FILE__).'/';
+ $adv = array();
+ if ( !@file_exists($my_path."$advlang/lang.adv.php") )
+ {
+ $advlang = 'en_UK';
+ }
+// Include language advices
+ @include_once( $my_path."$advlang/lang.adv.php" );
+
+// If there is an advice
+ if ( $cond )
+ {
+ $template->set_filenames(array(
+ 'admin_advice' => $my_path.'admin_advices.tpl')
+ );
+
+// Random Thumbnail
+ $query = '
+SELECT *
+FROM '.IMAGES_TABLE.'
+ORDER BY RAND(NOW())
+LIMIT 0, 1
+;';
+ $result = pwg_query($query);
+ $row = mysql_fetch_assoc($result);
+ if ( is_array($row) )
+ {
+ $url_modify = get_root_url().'admin.php?page=picture_modify'
+ .'&amp;image_id='.$row['id'];
+ $query = '
+SELECT * FROM '.IMAGE_TAG_TABLE.'
+WHERE image_id = ' . $row['id'] .'
+;';
+ $tag_count = mysql_num_rows(mysql_query($query));
+ $template->assign('thumbnail',
+ array(
+ 'IMAGE' => get_thumbnail_url($row),
+ 'IMAGE_ALT' => $row['file'],
+ 'IMAGE_TITLE' => $row['name'],
+ 'METADATA' => (empty($row['date_metadata_update'])) ?
+ 'un' : '',
+ 'NAME' => (empty($row['name'])) ?
+ 'un' : '',
+ 'COMMENT' => (empty($row['comment'])) ?
+ 'un' : '',
+ 'AUTHOR' => (empty($row['author'])) ?
+ 'un' : '',
+ 'CREATE_DATE' => (empty($row['date_creation'])) ?
+ 'un' : '',
+ 'TAGS' => ($tag_count == 0) ?
+ 'un' : '',
+ 'NUM_TAGS' => $tag_count,
+ 'U_MODIFY' => $url_modify,
+ )
+ );
+ }
+ $advice_text = array_shift($adv);
+ $template->assign(
+ array(
+ 'ADVICE_ABOUT' => '$conf[' . "'$confk'] ",
+ 'ADVICE_TEXT' => $advice_text,
+ )
+ );
+ $template->assign('More', $adv );
+ $template->pparse('admin_advice');
+ }
+}
+?>
diff --git a/BSF/plugins/admin_multi_view/controller.php b/BSF/plugins/admin_multi_view/controller.php
new file mode 100644
index 000000000..861df63a7
--- /dev/null
+++ b/BSF/plugins/admin_multi_view/controller.php
@@ -0,0 +1,221 @@
+<?php
+define('MULTIVIEW_CONTROLLER', 1);
+define('PHPWG_ROOT_PATH','../../');
+include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
+
+if (!is_admin() or !function_exists('multiview_user_init') )
+{
+ pwg_unset_session_var( 'multiview_as' );
+ pwg_unset_session_var( 'multiview_theme' );
+ pwg_unset_session_var( 'multiview_lang' );
+ pwg_unset_session_var( 'multiview_show_queries' );
+ pwg_unset_session_var( 'multiview_debug_l10n' );
+ pwg_unset_session_var( 'multiview_debug_template' );
+?>
+
+<script type="text/javascript">
+ window.close();
+</script>
+<?php
+ exit();
+}
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+<?php
+
+$refresh_main = false;
+
+if ( isset($_GET['view_as']) )
+{
+ if ( is_adviser() and $user['id']!=$_GET['view_as'] and $conf['guest_id']!=$_GET['view_as'])
+ die('security error');
+ pwg_set_session_var( 'multiview_as', (int)$_GET['view_as'] );
+ // user change resets theme/lang
+ pwg_unset_session_var( 'multiview_theme' );
+ pwg_unset_session_var( 'multiview_lang' );
+ $refresh_main = true;
+}
+if (pwg_get_session_var( 'multiview_as', $user['id']) != $user['id'] )
+ $view_as_user = build_user( pwg_get_session_var( 'multiview_as',0), false);
+else
+ $view_as_user = $user;
+
+if ( isset($_GET['theme']) )
+{
+ pwg_set_session_var( 'multiview_theme', $_GET['theme'] );
+ $refresh_main = true;
+}
+
+if ( isset($_GET['lang']) )
+{
+ pwg_set_session_var( 'multiview_lang', $_GET['lang'] );
+ $refresh_main = true;
+}
+
+if ( isset($_GET['show_queries']) )
+{
+ if ( $_GET['show_queries']> 0 )
+ pwg_set_session_var( 'multiview_show_queries', 1 );
+ else
+ pwg_unset_session_var( 'multiview_show_queries' );
+ $refresh_main = true;
+}
+
+if ( isset($_GET['debug_l10n']) )
+{
+ if ( $_GET['debug_l10n']>0 )
+ pwg_set_session_var( 'multiview_debug_l10n', 1 );
+ else
+ pwg_unset_session_var( 'multiview_debug_l10n' );
+ $refresh_main = true;
+}
+
+
+if ( isset($_GET['debug_template']) )
+{
+ if ( $_GET['debug_template']>0 )
+ pwg_set_session_var( 'multiview_debug_template', 1 );
+ else
+ pwg_unset_session_var( 'multiview_debug_template' );
+ $refresh_main = true;
+}
+
+$my_url = get_root_url().'plugins/'.basename(dirname(__FILE__)).'/'.basename(__FILE__);
+
+// +-----------------------------------------------------------------------+
+// | users |
+$query = '
+SELECT '.$conf['user_fields']['id'].' AS id,'.$conf['user_fields']['username'].' AS username
+FROM '.USERS_TABLE;
+if (is_adviser())
+{
+ $query .='
+ WHERE '.$conf['user_fields']['id']. ' IN ('.$user['id'].','.$conf['guest_id'].')
+';
+}
+$query .='
+ ORDER BY CONVERT('.$conf['user_fields']['username'].',CHAR)
+;';
+$user_map = simple_hash_from_query($query, 'id', 'username');
+
+$users_html = '<select onchange="document.location = this.options[this.selectedIndex].value;">';
+foreach( $user_map as $id=>$username)
+{
+ $selected = ($id==$view_as_user['id']) ? 'selected="selected"' : '';
+ $users_html .=
+ '<option value="'
+ .$my_url.'?view_as='.$id
+ .'" '.$selected.'>'
+ .$username
+ .'</option>';
+}
+$users_html.= '</select>';
+
+
+// +-----------------------------------------------------------------------+
+// | templates |
+$my_template = '';
+$themes_html='<select onchange="document.location = this.options[this.selectedIndex].value;">';
+foreach (get_pwg_themes() as $pwg_template)
+{
+ $selected = $pwg_template == pwg_get_session_var( 'multiview_theme', $view_as_user['template'].'/'.$view_as_user['theme'] ) ? 'selected="selected"' : '';
+ $my_template = $selected == '' ? $my_template : $view_as_user['template'].'/theme/'.$view_as_user['theme'];
+ $themes_html .=
+ '<option value="'
+ .$my_url.'?theme='.$pwg_template
+ .'" '.$selected.'>'
+ .$pwg_template
+ .'</option>';
+}
+$themes_html .= '</select>';
+
+// +-----------------------------------------------------------------------+
+// | language |
+$lang_html='<select onchange="document.location = this.options[this.selectedIndex].value;">';
+foreach (get_languages() as $language_code => $language_name)
+{
+ $selected = $language_code == pwg_get_session_var( 'multiview_lang', $view_as_user['language'] ) ? 'selected="selected"' : '';
+ $lang_html .=
+ '<option value="'
+ .$my_url.'?lang='.$language_code
+ .'" '.$selected.'>'
+ .$language_name
+ .'</option>';
+}
+$lang_html .= '</select>';
+
+// +-----------------------------------------------------------------------+
+// | show queries |
+$show_queries_html='';
+if (!$conf['show_queries'])
+{
+ if ( !pwg_get_session_var( 'multiview_show_queries', 0 ) )
+ $show_queries_html.='<a href="'.$my_url.'?show_queries=1">Show SQL queries</a>';
+ else
+ $show_queries_html.='<a href="'.$my_url.'?show_queries=0">Hide SQL queries</a>';
+}
+
+// +-----------------------------------------------------------------------+
+// | debug language |
+$debug_l10n_html='';
+if (!$conf['debug_l10n'])
+{
+ if ( !pwg_get_session_var( 'multiview_debug_l10n', 0 ) )
+ $debug_l10n_html.='<a href="'.$my_url.'?debug_l10n=1">Debug language</a>';
+ else
+ $debug_l10n_html.='<a href="'.$my_url.'?debug_l10n=0">Revert debug language</a>';
+}
+
+// +-----------------------------------------------------------------------+
+// | debug template |
+$debug_template_html='';
+if (!$conf['debug_template'])
+{
+ if ( !pwg_get_session_var( 'multiview_debug_template', 0 ) )
+ $debug_template_html.='<a href="'.$my_url.'?debug_template=1">Debug template</a>';
+ else
+ $debug_template_html.='<a href="'.$my_url.'?debug_template=0">Revert debug template</a>';
+}
+
+?>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_pwg_charset() ?>">
+<title>Controller</title>
+<?php
+// Controller will be displayed with the **real admin template** (without Any if it has been removed)
+if ( $my_template !== '') {
+ $my_template = get_root_url().'template/'.$my_template.'/theme.css';
+ echo '<link rel="stylesheet" type="text/css" href="' . $my_template .'">';
+}
+?>
+
+</head>
+<body>
+<div>
+<script type="text/javascript">
+if (window.opener==null) {
+ window.close();
+ document.write("<"+"h2>How did you get here ???<"+"/h2>");
+}
+</script>
+
+<table>
+<tr><td>User</td><td><?php echo $users_html; ?></td></tr>
+
+<tr><td>Theme</td><td><?php echo $themes_html; ?></td></tr>
+
+<tr><td>Lang</td><td><?php echo $lang_html; ?></td></tr>
+</table>
+<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html) ); ?>
+
+<script type="text/javascript">
+<?php
+ if ($refresh_main) echo '
+window.opener.location = window.opener.location;';
+?>
+</script>
+</div>
+</body>
+</html>
diff --git a/BSF/plugins/admin_multi_view/index.php b/BSF/plugins/admin_multi_view/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/admin_multi_view/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/admin_multi_view/is_admin.inc.php b/BSF/plugins/admin_multi_view/is_admin.inc.php
new file mode 100644
index 000000000..7ae1f90dc
--- /dev/null
+++ b/BSF/plugins/admin_multi_view/is_admin.inc.php
@@ -0,0 +1,47 @@
+<?php
+if (! defined('MULTIVIEW_CONTROLLER') )
+{
+ global $user;
+ $view_as = pwg_get_session_var( 'multiview_as', 0 );
+ if ($view_as)
+ {
+ $user = build_user( $view_as, true);
+ }
+ $theme = pwg_get_session_var( 'multiview_theme', '' );
+ if ( !empty($theme) )
+ {
+ list($user['template'], $user['theme']) = explode('/', $theme);
+ unset( $user['admin_template'], $user['admin_theme']);
+ }
+ $lang = pwg_get_session_var( 'multiview_lang', '' );
+ if ( !empty($lang) )
+ {
+ $user['language'] = $lang;
+ }
+ global $conf;
+ if (pwg_get_session_var( 'multiview_show_queries', 0 ))
+ $conf['show_queries'] = true;
+ if (pwg_get_session_var( 'multiview_debug_l10n', 0 ))
+ $conf['debug_l10n'] = true;
+ if (pwg_get_session_var( 'multiview_debug_template', 0 ))
+ $conf['debug_template'] = true;
+}
+
+add_event_handler('loc_end_page_header', 'multiview_loc_end_page_header');
+
+function multiview_loc_end_page_header()
+{
+ global $template;
+ $my_root_url = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/';
+ $js =
+'<script type="text/javascript">
+var theController = window.open("", "mview_controller", "alwaysRaised=yes,dependent=yes,toolbar=no,height=200,width=220,menubar=no,resizable=yes,scrollbars=yes,status=no");
+if ( theController.location.toString()=="about:blank" || !theController.location.toString().match(/^(https?.*\/)controller\.php(\?.+)?$/))
+{
+ theController.location = "'.$my_root_url.'controller.php";
+}
+</script>';
+
+ $template->append( 'head_elements', $js );
+}
+?>
diff --git a/BSF/plugins/admin_multi_view/main.inc.php b/BSF/plugins/admin_multi_view/main.inc.php
new file mode 100644
index 000000000..d29486fd0
--- /dev/null
+++ b/BSF/plugins/admin_multi_view/main.inc.php
@@ -0,0 +1,42 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Multi view
+Version: 1.8
+Description: Allows administrators to view gallery as guests and/or change the language and/or theme on the fly. Practical to debug changes ...
+Plugin URI: http://piwigo.org
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+add_event_handler('user_init', 'multiview_user_init' );
+
+function multiview_user_init()
+{
+ if (!is_admin())
+ return;
+ include_once( dirname(__FILE__).'/is_admin.inc.php' );
+}
+
+?>
diff --git a/BSF/plugins/c13y_upgrade/index.php b/BSF/plugins/c13y_upgrade/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/c13y_upgrade/initialize.inc.php b/BSF/plugins/c13y_upgrade/initialize.inc.php
new file mode 100644
index 000000000..cd7034c4c
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/initialize.inc.php
@@ -0,0 +1,142 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+add_event_handler('list_check_integrity', 'c13y_upgrade');
+
+function c13y_upgrade($c13y)
+{
+ global $conf;
+
+ load_language('plugin.lang', dirname(__FILE__).'/');
+
+ $can_be_deactivate = true;
+
+ /* Check user with same e-mail */
+ $query = '
+select
+ count(*)
+from
+ '.USERS_TABLE.'
+where
+ '.$conf['user_fields']['email'].' is not null
+group by
+ upper('.$conf['user_fields']['email'].')
+having count(*) > 1
+limit 0,1
+;';
+
+ if (mysql_fetch_array(pwg_query($query)))
+ {
+ $can_be_deactivate = false;
+ $c13y->add_anomaly(
+ l10n('c13y_dbl_email_user'),
+ null,
+ null,
+ l10n('c13y_correction_dbl_email_user'));
+ }
+
+ /* Check plugin included in Piwigo sources */
+ $included_plugins = array('dew', 'UpToDate', 'PluginsManager');
+ $query = '
+select
+ id
+from
+ '.PLUGINS_TABLE.'
+where
+ id in ('.
+ implode(
+ ',',
+ array_map(
+ create_function('$s', 'return "\'".$s."\'";'),
+ $included_plugins
+ )
+ )
+ .')
+;';
+
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_assoc($result))
+ {
+ $can_be_deactivate = false;
+
+ $uninstall_msg_link =
+ '<a href="'.
+ PHPWG_ROOT_PATH.
+ 'admin.php?page=plugins_list&amp;plugin='.$row['id'].'&amp;action=uninstall'.
+ '" onclick="window.open(this.href, \'\'); return false;">'.
+ sprintf(l10n('c13y_correction_obsolete_plugin'), $row['id']).'</a>';
+
+ $c13y->add_anomaly(
+ l10n('c13y_obsolete_plugin'),
+ null,
+ null,
+ $uninstall_msg_link);
+ }
+
+ /* Check if this plugin must deactivate */
+ if ($can_be_deactivate)
+ {
+ $deactivate_msg_link =
+ '<a href="'.
+ PHPWG_ROOT_PATH.
+ 'admin.php?page=plugins_list&amp;plugin=c13y_upgrade&amp;action=deactivate'.
+ '" onclick="window.open(this.href, \'\'); return false;">'.
+ l10n('c13y_upgrade_deactivate').'</a>';
+
+ $c13y->add_anomaly(
+ l10n('c13y_upgrade_no_anomaly'),
+ 'c13y_upgrade_correction',
+ 'deactivate_plugin',
+ $deactivate_msg_link
+ );
+ }
+}
+
+function c13y_upgrade_correction($action)
+{
+ $result = false;
+
+ switch ($action)
+ {
+ case 'deactivate_plugin':
+ {
+ $query = '
+REPLACE INTO '.PLUGINS_TABLE.'
+(id, state)
+VALUES (\'c13y_upgrade\', \'inactive\')
+;';
+ pwg_query($query);
+ $result = true;
+ }
+ break;
+ }
+
+ return $result;
+}
+
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/en_UK/index.php b/BSF/plugins/c13y_upgrade/language/en_UK/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/en_UK/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php b/BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
new file mode 100644
index 000000000..b4fd37004
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
@@ -0,0 +1,32 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
+$lang['c13y_upgrade_no_anomaly'] = 'No anomaly detected after application upgrade';
+$lang['c13y_upgrade_deactivate'] = 'You can deactivate "Check upgrades" plugin';
+$lang['c13y_dbl_email_user'] = 'Users with same email address';
+$lang['c13y_correction_dbl_email_user'] = 'Delete duplicate users';
+$lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
+$lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
+
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/es_ES/index.php b/BSF/plugins/c13y_upgrade/language/es_ES/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/es_ES/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php b/BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
new file mode 100644
index 000000000..839623f1c
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
@@ -0,0 +1,32 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
+$lang['c13y_upgrade_no_anomaly'] = 'Ninguna anomalía detectada después de la puesta al día de la aplicación';
+$lang['c13y_upgrade_deactivate'] = 'Usted puede desactivar el plugin Check upgrades';
+$lang['c13y_dbl_email_user'] = 'Utilizadores con la misma dirección e-mail';
+$lang['c13y_correction_dbl_email_user'] = 'Suprima a los utilizadores en duplicado';
+/* TODO */ $lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
+/* TODO */ $lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
+
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/fr_FR/index.php b/BSF/plugins/c13y_upgrade/language/fr_FR/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/fr_FR/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php b/BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
new file mode 100644
index 000000000..bd903f213
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
@@ -0,0 +1,32 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
+$lang['c13y_upgrade_no_anomaly'] = 'Pas d\'anomalie détectée après la mise à jour de l\'application';
+$lang['c13y_upgrade_deactivate'] = 'Vous pouvez désactiver le plugin "Check upgrades"';
+$lang['c13y_dbl_email_user'] = 'Utilisateurs avec la même adresse email';
+$lang['c13y_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double';
+$lang['c13y_obsolete_plugin'] = 'Plugin obsolète';
+$lang['c13y_correction_obsolete_plugin'] = 'Le plugin "%s" a été inclus dans cette version de l\'application et vous devez le désinstaller.';
+
+?>
diff --git a/BSF/plugins/c13y_upgrade/language/index.php b/BSF/plugins/c13y_upgrade/language/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/language/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/c13y_upgrade/main.inc.php b/BSF/plugins/c13y_upgrade/main.inc.php
new file mode 100644
index 000000000..a6130322e
--- /dev/null
+++ b/BSF/plugins/c13y_upgrade/main.inc.php
@@ -0,0 +1,46 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Check upgrades
+Version: 1.8
+Description: Check integrity of upgrades / Contrôle d'intégrité des mises à jour
+Plugin URI: http://piwigo.org
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+if (in_array(script_basename(), array('popuphelp', 'admin')))
+{
+ if (defined('IN_ADMIN') and IN_ADMIN)
+ {
+ include_once(dirname(__FILE__).'/initialize.inc.php');
+ }
+}
+
+?>
diff --git a/BSF/plugins/event_tracer/event_list.php b/BSF/plugins/event_tracer/event_list.php
new file mode 100644
index 000000000..ae617fe87
--- /dev/null
+++ b/BSF/plugins/event_tracer/event_list.php
@@ -0,0 +1,90 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+function get_php_files($path, $to_ignore=array(), $recursive=true )
+{
+ $files = array();
+ if (is_dir($path))
+ {
+ if ($contents = opendir($path))
+ {
+ while (($node = readdir($contents)) !== false)
+ {
+ if ($node != '.' and $node != '..' and $node != '.svn'
+ and !in_array($node, $to_ignore) )
+ {
+ if ( $recursive and is_dir($path.'/'.$node) )
+ {
+ $files = array_merge($files, get_php_files($path.'/'.$node, $to_ignore));
+
+ }
+ if ( is_file($path.'/'.$node) )
+ {
+ $files[] = $path.'/'.$node;
+ }
+ }
+ }
+ closedir($contents);
+ }
+ }
+ return $files;
+}
+
+$files = array();
+$files = array_merge( $files, get_php_files('.', array(), false) );
+$files = array_merge( $files, get_php_files('./include') );
+$files = array_merge( $files, get_php_files('./admin') );
+$files = array_unique($files);
+
+$events = array();
+foreach ($files as $file)
+{
+ $code = file_get_contents($file);
+ $code = preg_replace( '#\?'.'>.*<\?php#m', '', $code);
+ $code = preg_replace( '#\/\*.*\*\/#m', '', $code);
+ $code = preg_replace( '#\/\/.*#', '', $code);
+
+ $count = preg_match_all(
+ '#[^a-zA-Z_$-]trigger_(action|event)\s*\(\s*([^,)]+)#m',
+ $code, $matches
+ );
+
+ for ($i=0; $i<$count; $i++)
+ {
+ $type = $matches[1][$i];
+ $name = preg_replace( '#^[\'"]?([^\'"]*)[\'"]?$#', '$1', $matches[2][$i]);
+ array_push($events, array($type,$name,$file) );
+ }
+}
+
+$sort= isset($_GET['sort']) ? $_GET['sort'] : 1;
+usort(
+ $events,
+ create_function( '$a,$b', 'return $a['.$sort.']>$b['.$sort.'];' )
+ );
+
+global $template;
+
+$url = get_admin_plugin_menu_link(__FILE__);
+
+$template->assign( array(
+ 'NB_EVENTS' => count($events),
+ 'U_SORT0' => add_url_params($url, array('sort'=>0) ),
+ 'U_SORT1' => add_url_params($url, array('sort'=>1) ),
+ 'U_SORT2' => add_url_params($url, array('sort'=>2) ),
+ ) );
+
+$template->assign('events', array());
+foreach ($events as $e)
+{
+ $template->append( 'events', array(
+ 'TYPE' => $e[0],
+ 'NAME' => $e[1],
+ 'FILE' => $e[2],
+ )
+ );
+}
+
+$template->set_filenames( array('event_list' => dirname(__FILE__).'/event_list.tpl' ) );
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'event_list');
+?>
diff --git a/BSF/plugins/event_tracer/event_list.tpl b/BSF/plugins/event_tracer/event_list.tpl
new file mode 100644
index 000000000..accc27278
--- /dev/null
+++ b/BSF/plugins/event_tracer/event_list.tpl
@@ -0,0 +1,17 @@
+{* $Id$ *}
+There are {$NB_EVENTS} calls to triger_event or triger_action.
+
+<table width="99%" class="table2">
+<tr class="throw">
+ <th><a href="{$U_SORT0}">Type</a></th>
+ <th><a href="{$U_SORT1}">Name</a></th>
+ <th><a href="{$U_SORT2}">File</a></th>
+</tr>
+{foreach from=$events item=event}
+<tr>
+ <td>{$event.TYPE}</td>
+ <td>{$event.NAME}</td>
+ <td>{$event.FILE}</td>
+</tr>
+{/foreach}
+</table>
diff --git a/BSF/plugins/event_tracer/index.php b/BSF/plugins/event_tracer/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/event_tracer/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/event_tracer/main.inc.php b/BSF/plugins/event_tracer/main.inc.php
new file mode 100644
index 000000000..dcf282146
--- /dev/null
+++ b/BSF/plugins/event_tracer/main.inc.php
@@ -0,0 +1,137 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Event tracer
+Version: 1.8.a
+Description: For developers. Shows all calls to trigger_event.
+Plugin URI: http://piwigo.org
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+class EventTracer
+{
+ var $me_working;
+ var $my_config;
+
+ function EventTracer()
+ {
+ $this->me_working=0;
+ }
+
+ function get_config_file_dir()
+ {
+ global $conf;
+ return $conf['local_data_dir'].'/plugins/';
+ }
+
+ function get_config_file_name()
+ {
+ return basename(dirname(__FILE__)).'.dat';
+ }
+
+ function load_config()
+ {
+ $x = @file_get_contents( $this->get_config_file_dir().$this->get_config_file_name() );
+ if ($x!==false)
+ {
+ $c = unserialize($x);
+ // do some more tests here
+ $this->my_config = $c;
+ }
+ if ( !isset($this->my_config)
+ or empty($this->my_config['filters']) )
+ {
+ $this->my_config['filters'] = array( '.*' );
+ $this->my_config['show_args'] = false;
+ $this->save_config();
+ }
+ }
+
+ function save_config()
+ {
+ $dir = $this->get_config_file_dir();
+ @mkdir($dir);
+ $file = fopen( $dir.$this->get_config_file_name(), 'w' );
+ fwrite($file, serialize($this->my_config) );
+ fclose( $file );
+ }
+
+ function on_pre_trigger_event($event_info)
+ {
+ $this->dump('pre_trigger_event', $event_info);
+ }
+ function on_post_trigger_event($event_info)
+ {
+ $this->dump('post_trigger_event', $event_info);
+ }
+
+ function on_trigger_action($event_info)
+ {
+ $this->dump('trigger_action', $event_info);
+ }
+
+ function dump($event, $event_info)
+ {
+ foreach( $this->my_config['filters'] as $filter)
+ {
+ if ( preg_match( '/'.$filter.'/', $event_info['event'] ) )
+ {
+ if ($this->my_config['show_args'])
+ {
+ $s = '<pre>';
+ $s .= htmlspecialchars( var_export( $event_info['data'], true ) );
+ $s .= '</pre>';
+ }
+ else
+ $s = '';
+ pwg_debug($event.' "'.$event_info['event'].'" '.($s) );
+ break;
+ }
+ }
+ }
+
+ function plugin_admin_menu($menu)
+ {
+ array_push($menu,
+ array(
+ 'NAME' => 'Event Tracer',
+ 'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/tracer_admin.php')
+ )
+ );
+ return $menu;
+ }
+}
+
+$obj = new EventTracer();
+$obj->load_config();
+
+add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'plugin_admin_menu') );
+add_event_handler('pre_trigger_event', array(&$obj, 'on_pre_trigger_event') );
+add_event_handler('post_trigger_event', array(&$obj, 'on_post_trigger_event') );
+add_event_handler('trigger_action', array(&$obj, 'on_trigger_action') );
+set_plugin_data($plugin['id'], $obj);
+?>
diff --git a/BSF/plugins/event_tracer/maintain.inc.php b/BSF/plugins/event_tracer/maintain.inc.php
new file mode 100644
index 000000000..f7d0131c5
--- /dev/null
+++ b/BSF/plugins/event_tracer/maintain.inc.php
@@ -0,0 +1,9 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+function plugin_uninstall($plugin_id)
+{
+ global $conf;
+ @unlink( $conf['local_data_dir'].'/plugins/'.$plugin_id.'.dat' );
+}
+?>
diff --git a/BSF/plugins/event_tracer/tracer_admin.php b/BSF/plugins/event_tracer/tracer_admin.php
new file mode 100644
index 000000000..b17f2a301
--- /dev/null
+++ b/BSF/plugins/event_tracer/tracer_admin.php
@@ -0,0 +1,31 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+$me = get_plugin_data($plugin_id);
+
+global $template;
+$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/tracer_admin.tpl') );
+
+if ( isset($_POST['eventTracer_filters']) )
+{
+ $v = $_POST['eventTracer_filters'];
+ $v = str_replace( "\r\n", "\n", $v );
+ $v = str_replace( "\n\n", "\n", $v );
+ $v = stripslashes($v);
+ if (!empty($v))
+ $me->my_config['filters'] = explode("\n", $v);
+ else
+ $me->my_config['filters'] = array();
+ $me->my_config['show_args'] = isset($_POST['eventTracer_show_args']);
+ $me->save_config();
+ global $page;
+ array_push($page['infos'], 'event tracer options saved');
+}
+$template->assign('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) );
+$template->assign('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' );
+$template->assign('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php'));
+
+//$template->assign_var('EVENT_TRACER_F_ACTION', $my_url);
+
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
+?>
diff --git a/BSF/plugins/event_tracer/tracer_admin.tpl b/BSF/plugins/event_tracer/tracer_admin.tpl
new file mode 100644
index 000000000..17d7e2b01
--- /dev/null
+++ b/BSF/plugins/event_tracer/tracer_admin.tpl
@@ -0,0 +1,29 @@
+{* $Id$ *}
+<div class="titrePage">
+ <h2>Event Tracer</h2>
+</div>
+
+<p>
+The event tracer is a developer tool that logs in the footer of the window all calls to trigger_event method.
+You can use this plugin to see what events is Piwigo calling.
+<b>Note that $conf['show_queries'] must be true.</b>
+</p>
+<form method="post" action="" class="general">
+<fieldset>
+ <legend>Event Tracer</legend>
+
+<label>Show event argument
+ <input type="checkbox" name="eventTracer_show_args" {$EVENT_TRACER_SHOW_ARGS} />
+</label>
+<br/>
+<label>Fill below a list of regular expressions (one per line).
+An event will be logged if its name matches at least one expression in the list.
+ <textarea name="eventTracer_filters" id="eventTracer_filters"rows="10" cols="80">{$EVENT_TRACER_FILTERS}</textarea>
+</label>
+
+</fieldset>
+
+<p><input class="submit" type="submit" value="Submit" /></p>
+
+<p><a href="{$U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p>
+</form>
diff --git a/BSF/plugins/extended_description/index.php b/BSF/plugins/extended_description/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/extended_description/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/extended_description/main.inc.php b/BSF/plugins/extended_description/main.inc.php
new file mode 100644
index 000000000..f8839b4c7
--- /dev/null
+++ b/BSF/plugins/extended_description/main.inc.php
@@ -0,0 +1,69 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Extended Description
+Version: 1.8
+Description: Allow multilanguage description / Permet d'avoir des descriptions mutilingues
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=175
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+function get_user_language_desc($desc)
+{
+ global $user;
+
+ $user_lang = substr($user['language'], 0, 2);
+
+ if (!substr_count(strtolower($desc), '[lang=' . $user_lang . ']'))
+ {
+ $user_lang = 'default';
+ if (!substr_count(strtolower($desc), '[lang=default]'))
+ {
+ $desc = preg_replace("#(\A|\[/lang\])(.*?)(\[lang=(.*?)\]|\Z)#is", '$1[lang=default]$2[/lang]$3', $desc);
+ }
+ }
+
+ preg_match_all("#\[lang=(" . $user_lang . "|all)\](.*?)\[/lang\]#is", $desc, $matches);
+
+ return implode('', $matches[2]);
+}
+
+function extended_desc_mail_group_assign_vars($assign_vars)
+{
+ if (isset($assign_vars['CPL_CONTENT']))
+ {
+ $assign_vars['CPL_CONTENT'] = get_user_language_desc($assign_vars['CPL_CONTENT']);
+ }
+ return $assign_vars;
+}
+
+add_event_handler ('render_category_description', 'get_user_language_desc');
+add_event_handler ('render_element_description', 'get_user_language_desc');
+add_event_handler('nbm_render_user_customize_mail_content', 'get_user_language_desc');
+add_event_handler('mail_group_assign_vars', 'extended_desc_mail_group_assign_vars');
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/hello_world/index.php b/BSF/plugins/hello_world/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/hello_world/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/hello_world/main.inc.php b/BSF/plugins/hello_world/main.inc.php
new file mode 100644
index 000000000..07808d0d9
--- /dev/null
+++ b/BSF/plugins/hello_world/main.inc.php
@@ -0,0 +1,56 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Hello World
+Version: 1.8
+Description: This example plugin changes the page banner for the administration page.
+Plugin URI: http://piwigo.org
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+add_event_handler('loc_begin_page_header', 'hello_world_begin_header' );
+
+function hello_world_begin_header()
+{
+ global $page;
+ if ( isset($page['body_id']) and $page['body_id']=='theAdminPage')
+ {
+ $hellos = array( 'Aloha', 'Ahoy', 'Guten tag', 'Hello', 'Hoi', 'Hola', 'Salut', 'Yo' );
+ shuffle($hellos);
+ $page['page_banner'] = $hellos[0];
+ // just as an example we modify it a little bit later
+ add_event_handler('loc_end_page_header', 'hello_world_end_header');
+ }
+}
+
+
+function hello_world_end_header()
+{
+ global $template, $page;
+ $template->assign( 'PAGE_BANNER',
+ '<h1>"'.$page['page_banner'].'" from Piwigo plugin!</h1>');
+}
+
+?> \ No newline at end of file
diff --git a/BSF/plugins/index.php b/BSF/plugins/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/language_switch/icons/cz_CZ.gif b/BSF/plugins/language_switch/icons/cz_CZ.gif
new file mode 100644
index 000000000..89686c417
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/cz_CZ.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/de_DE.gif b/BSF/plugins/language_switch/icons/de_DE.gif
new file mode 100644
index 000000000..9b3009565
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/de_DE.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/en_UK.gif b/BSF/plugins/language_switch/icons/en_UK.gif
new file mode 100644
index 000000000..51b20e3c1
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/en_UK.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/es_AR.gif b/BSF/plugins/language_switch/icons/es_AR.gif
new file mode 100644
index 000000000..677979bc5
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/es_AR.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/es_ES.gif b/BSF/plugins/language_switch/icons/es_ES.gif
new file mode 100644
index 000000000..d0d5adbbb
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/es_ES.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/fr_FR.gif b/BSF/plugins/language_switch/icons/fr_FR.gif
new file mode 100644
index 000000000..9080a66bf
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/fr_FR.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/hu_HU.gif b/BSF/plugins/language_switch/icons/hu_HU.gif
new file mode 100644
index 000000000..4eb513589
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/hu_HU.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/index.php b/BSF/plugins/language_switch/icons/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/language_switch/icons/it_IT.gif b/BSF/plugins/language_switch/icons/it_IT.gif
new file mode 100644
index 000000000..0ee512d4c
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/it_IT.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/nl_NL.gif b/BSF/plugins/language_switch/icons/nl_NL.gif
new file mode 100644
index 000000000..520e994b7
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/nl_NL.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/pl_PL.gif b/BSF/plugins/language_switch/icons/pl_PL.gif
new file mode 100644
index 000000000..66f140606
--- /dev/null
+++ b/BSF/plugins/language_switch/icons/pl_PL.gif
Binary files differ
diff --git a/BSF/plugins/language_switch/index.php b/BSF/plugins/language_switch/index.php
new file mode 100644
index 000000000..c15b15795
--- /dev/null
+++ b/BSF/plugins/language_switch/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/BSF/plugins/language_switch/language_switch.inc.php b/BSF/plugins/language_switch/language_switch.inc.php
new file mode 100644
index 000000000..baaa0375a
--- /dev/null
+++ b/BSF/plugins/language_switch/language_switch.inc.php
@@ -0,0 +1,92 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+function language_switch()
+{
+ global $user, $template, $conf, $lang;
+ if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
+ $same = $user['language'];
+ if ( isset( $_GET['lang']) )
+ {
+ if ( !empty($_GET['lang'] ) and
+ file_exists( PHPWG_ROOT_PATH.'language/'
+ . $_GET['lang'].'/common.lang.php') )
+ {
+ if (is_a_guest() or is_generic())
+ {
+ setcookie( 'pwg_lang_switch', $_GET['lang'],
+ time()+60*60*24*30, cookie_path() );
+ }
+ else
+ {
+ $query = 'UPDATE '.USER_INFOS_TABLE.'
+ SET language = \''.$_GET['lang'].'\'
+ WHERE user_id = '.$user['id'].'
+ ;';
+ pwg_query($query);
+ }
+ $user['language'] = $_GET['lang'];
+ }
+ }
+// Users have $user['language']
+// Guest or generic members will use their cookied language !
+ if ((is_a_guest() or is_generic())
+ and isset( $_COOKIE['pwg_lang_switch'] ) )
+ {
+ $user['language'] = $_COOKIE['pwg_lang_switch'];
+ }
+// Reload language only if it isn't the same one
+ if ( $same !== $user['language'])
+ {
+ load_language('common.lang', '', $user['language']);
+ load_language('local.lang', '', $user['language']);
+ if (defined('IN_ADMIN') and IN_ADMIN)
+ {
+ load_language('admin.lang', '', $user['language']);
+ }
+ }
+}
+//if ( isset( $_GET['lang']) ) { redirect( make_index_url() ); }
+
+function Lang_flags()
+{
+ global $user, $template;
+ $available_lang = get_languages();
+ foreach ( $available_lang as $code => $displayname )
+ {
+ $qlc_url = add_url_params( make_index_url(), array( 'lang' => $code ) );
+ $qlc_alt = ucwords( $displayname );
+ $qlc_title = $qlc_alt;
+ $qlc_img = 'plugins/language_switch/icons/'
+ . $code . '.gif';
+
+ if ( $code !== $user['language'] and file_exists(PHPWG_ROOT_PATH.$qlc_img) )
+ {
+ $template->concat( 'PLUGIN_INDEX_ACTIONS',
+ '<li><a href="' . $qlc_url . '" ><img src="' . get_root_url().$qlc_img . '" alt="'
+ . $qlc_alt . '" title="'
+ . $qlc_title . '" style="border: 1px solid #000000; '
+ . ' margin: 0px 2px;" /></a></li>');
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/BSF/plugins/language_switch/main.inc.php b/BSF/plugins/language_switch/main.inc.php
new file mode 100644
index 000000000..0d3df1085
--- /dev/null
+++ b/BSF/plugins/language_switch/main.inc.php
@@ -0,0 +1,36 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Language Switch
+Version: 1.8
+Description: Switch to another language from flags on your gallery home page.
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=123
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+include_once(PHPWG_PLUGINS_PATH.'language_switch/language_switch.inc.php');
+add_event_handler('loading_lang', 'language_switch' );
+add_event_handler('loc_end_index', 'Lang_flags' );
+?> \ No newline at end of file