add_index plugin cleanup

Fix reading html mail on webmail (like webmail free)

git-svn-id: http://piwigo.org/svn/trunk@1808 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2007-02-12 06:09:05 +00:00
commit 62c1993adc
7 changed files with 3 additions and 175 deletions

View file

@ -1,76 +0,0 @@
<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $RCSfile$
// | last update : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
// | last modifier : $Author: rub $
// | revision : $Revision: 1481 $
// +-----------------------------------------------------------------------+
// | 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!');
}
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
// +-----------------------------------------------------------------------+
// | Main |
// +-----------------------------------------------------------------------+
global $template, $conf;
// +-----------------------------------------------------------------------+
// | template initialization |
// +-----------------------------------------------------------------------+
$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/admin_menu.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))
$this->my_config['filters'] = explode("\n", $v);
else
$this->my_config['filters'] = array();
$this->my_config['show_args'] = isset($_POST['eventTracer_show_args']);
$this->save_config();
global $page;
array_push($page['infos'], 'event tracer options saved');
}
$template->assign_var('EVENT_TRACER_FILTERS', implode("\n", $this->my_config['filters'] ) );
$template->assign_var('EVENT_TRACER_SHOW_ARGS', $this->my_config['show_args'] ? 'checked="checked"' : '' );*/
$template->assign_var('filename', $conf['add_index_filename']);
$template->assign_var('source_directory_path', $conf['add_index_source_directory_path']);
//$template->assign_var('F_ACTION', $my_url);
// +-----------------------------------------------------------------------+
// | Sending html code |
// +-----------------------------------------------------------------------+
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
?>

View file

@ -1,33 +0,0 @@
<!-- $Id: admin_menu.tpl Ruben ARNAUD -->
<div class="titrePage">
<h2>{lang:Add_Index}</h2>
</div>
<p>{lang:add_index_Description_1}</p>
<p>{lang:add_index_Description_2}</p>
<form method="post" name="admin_menu" id="admin_menu" action="{F_ACTION}">
<fieldset>
<legend>{lang:add_index_Parameters}</legend>
<table>
<tr>
<td>
<label for="filename">{lang:add_index_filename}</label>
</td>
<td><input type="text" maxlength="35" size="35" name="add_index_filename" id="filename" value="{filename}"/></td>
</tr>
<tr>
<td>
<label for="source_directory_path">{lang:add_index_source_directory_path}</label>
</td>
<td><input type="text" maxlength="35" size="35" name="add_index_source_directory_path" id="source_directory_path" value="{source_directory_path}"/></td>
</tr>
</table>
</fieldset>
<p>
<!--<input type="submit" value="{lang:Submit}" name="param_submit" {TAG_INPUT_ENABLED}/>-->
<input type="reset" value="{lang:Reset}" name="param_reset"/>
</p>
</form>

View file

@ -29,7 +29,6 @@
$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['Menu_Add_Index'] = 'Add "index"';
$lang['add_index_file_copied'] = '%s copied';
$lang['add_index_file_not_copied'] = '%s not copied';
@ -42,11 +41,4 @@ $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';
$lang['add_index_Description_1'] = 'Add "index" files allows to copy "index" file from source directory to all sub-directories of gallerie local sites.';
$lang['add_index_Description_2'] = '"index" file prevents to list contents of a directory.';
$lang['add_index_Parameters'] = 'Parameters';
$lang['add_index_filename'] = 'File name';
$lang['add_index_source_directory_path'] = 'Path of source directory';
?>

View file

@ -29,7 +29,6 @@
$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['Menu_Add_Index'] = 'Add "index"';
$lang['add_index_file_copied'] = '%s copié';
$lang['add_index_file_not_copied'] = '%s non copié';
@ -42,10 +41,4 @@ $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';
$lang['add_index_Description_1'] = 'L\'ajout des fichiers " permet de copier le fichier "index" du repertoire source vers tous les sous-répertoires des galeries des sites locaux.';
$lang['add_index_Description_2'] = 'Le fichier "index" empêche de lister le contenu d\'un répertoire.';
$lang['add_index_Parameters'] = 'Paramètres';
$lang['add_index_filename'] = 'Nom du fichier';
$lang['add_index_source_directory_path'] = 'Chemin du répertoire source';
?>

View file

@ -36,6 +36,7 @@ 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']))
{
@ -83,17 +84,6 @@ class AdminAddIndex extends AddIndex
return $site_manager_plugin_links;
}
function plugin_admin_menu($menu)
{
array_push($menu,
array(
'NAME' => l10n('Menu_Add_Index'),
'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/admin_menu.php')
)
);
return $menu;
}
}
// Create object
@ -106,6 +96,5 @@ $add_index->load_params();
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);
add_event_handler('get_admin_plugin_menu_links', array(&$add_index, 'plugin_admin_menu') );
?>

View file

@ -1,38 +0,0 @@
<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $RCSfile$
// | last update : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
// | last modifier : $Author: rub $
// | revision : $Revision: 1481 $
// +-----------------------------------------------------------------------+
// | 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 plugin_uninstall($plugin_id)
{
if ($plugin_id == 'add_index')
{
//$query = 'delete from '.CONFIG_TABLE.' where param in ';
//pwg_query($query);
}
}
?>