[21964] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: user delete photo |
---|
| 4 | Version: auto |
---|
| 5 | Description: Users can delete their photos (option on the photo page) |
---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=690 |
---|
| 7 | Author: ddtddt |
---|
[31464] | 8 | Author URI: http://temmii.com/piwigo/ |
---|
[21964] | 9 | */ |
---|
| 10 | |
---|
[31464] | 11 | // +-----------------------------------------------------------------------+ |
---|
| 12 | // | user delete photo plugin for piwigo | |
---|
| 13 | // +-----------------------------------------------------------------------+ |
---|
| 14 | // | Copyright(C) 2013 - 2016 ddtddt http://temmii.com/piwigo/ | |
---|
| 15 | // +-----------------------------------------------------------------------+ |
---|
| 16 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 17 | // | it under the terms of the GNU General Public License as published by | |
---|
| 18 | // | the Free Software Foundation | |
---|
| 19 | // | | |
---|
| 20 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 21 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 22 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 23 | // | General Public License for more details. | |
---|
| 24 | // | | |
---|
| 25 | // | You should have received a copy of the GNU General Public License | |
---|
| 26 | // | along with this program; if not, write to the Free Software | |
---|
| 27 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 28 | // | USA. | |
---|
| 29 | // +-----------------------------------------------------------------------+ |
---|
| 30 | |
---|
[21964] | 31 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 32 | |
---|
| 33 | global $prefixeTable; |
---|
| 34 | |
---|
| 35 | define('UDP_DIR' , basename(dirname(__FILE__))); |
---|
| 36 | define('UDP_PATH' , PHPWG_PLUGINS_PATH . UDP_DIR . '/'); |
---|
[31464] | 37 | define('UDP_ADMIN',get_root_url().'admin.php?page=plugin-'.UDP_DIR); |
---|
[21964] | 38 | |
---|
[31464] | 39 | add_event_handler('loading_lang', 'user_delete_photo_loading_lang'); |
---|
| 40 | function user_delete_photo_loading_lang(){ |
---|
| 41 | load_language('plugin.lang', UDP_PATH); |
---|
| 42 | } |
---|
[21964] | 43 | |
---|
| 44 | // Plugin on picture page |
---|
[31464] | 45 | if (script_basename() == 'picture'){ |
---|
[21964] | 46 | include_once(dirname(__FILE__).'/initpicture.php'); |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | // menu admin |
---|
| 50 | add_event_handler('get_admin_plugin_menu_links', 'UDP_admin_menu'); |
---|
[31464] | 51 | function UDP_admin_menu($menu){ |
---|
| 52 | $menu[] = array( |
---|
| 53 | 'NAME' => l10n('user delete photo'), |
---|
| 54 | 'URL' => UDP_ADMIN, |
---|
| 55 | ); |
---|
| 56 | return $menu; |
---|
[21964] | 57 | } |
---|
| 58 | |
---|
| 59 | ?> |
---|