[10874] | 1 | <?php |
---|
| 2 | /* |
---|
[11084] | 3 | Plugin Name: Copyrights |
---|
[10874] | 4 | Version: Alpha |
---|
| 5 | Description: Create copyrights and assign them to your photos. |
---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=537 |
---|
[11422] | 7 | Author: Mattias & J.Commelin (dwo) |
---|
[10874] | 8 | Author URI: http://www.watergallery.nl/piwigo/plugins/copyrights/ |
---|
| 9 | */ |
---|
[10931] | 10 | // +-----------------------------------------------------------------------+ |
---|
| 11 | // | Piwigo - a PHP based picture gallery | |
---|
| 12 | // +-----------------------------------------------------------------------+ |
---|
| 13 | // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | |
---|
| 14 | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | |
---|
| 15 | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | |
---|
| 16 | // +-----------------------------------------------------------------------+ |
---|
| 17 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 18 | // | it under the terms of the GNU General Public License as published by | |
---|
| 19 | // | the Free Software Foundation | |
---|
| 20 | // | | |
---|
| 21 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 22 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 23 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 24 | // | General Public License for more details. | |
---|
| 25 | // | | |
---|
| 26 | // | You should have received a copy of the GNU General Public License | |
---|
| 27 | // | along with this program; if not, write to the Free Software | |
---|
| 28 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 29 | // | USA. | |
---|
| 30 | // +-----------------------------------------------------------------------+ |
---|
[10874] | 31 | |
---|
| 32 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 33 | |
---|
[11423] | 34 | define('COPYRIGHTS_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/'); // The plugin path |
---|
| 35 | define('COPYRIGHTS_WEB_PATH', get_root_url().'admin.php?page=plugin-Copyrights'); // The path used in admin.php |
---|
[10874] | 36 | |
---|
| 37 | global $prefixeTable; |
---|
| 38 | define('COPYRIGHTS_ADMIN', $prefixeTable.'copyrights_admin'); // The db |
---|
| 39 | define('COPYRIGHTS_MEDIA', $prefixeTable.'copyrights_media'); // The db |
---|
| 40 | |
---|
| 41 | include_once(COPYRIGHTS_PATH . 'include/functions.inc.php'); |
---|
| 42 | |
---|
[11075] | 43 | |
---|
| 44 | /* +-----------------------------------------------------------------------+ |
---|
| 45 | * | Plugin admin | |
---|
| 46 | * +-----------------------------------------------------------------------+ */ |
---|
| 47 | |
---|
| 48 | |
---|
[11423] | 49 | // Add to the menu, dont do anything right now |
---|
[10874] | 50 | add_event_handler('get_admin_plugin_menu_links', 'copyrights_admin_menu'); |
---|
| 51 | function copyrights_admin_menu($menu) { |
---|
| 52 | array_push( |
---|
| 53 | $menu, |
---|
| 54 | array( |
---|
| 55 | 'NAME' => 'Copyrights', |
---|
| 56 | 'URL' => get_admin_plugin_menu_link(dirname(__FILE__)).'/admin.php' |
---|
| 57 | ) |
---|
| 58 | ); |
---|
| 59 | return $menu; |
---|
| 60 | } |
---|
| 61 | |
---|
[11075] | 62 | |
---|
| 63 | /* +-----------------------------------------------------------------------+ |
---|
| 64 | * | Plugin image | |
---|
| 65 | * +-----------------------------------------------------------------------+ */ |
---|
| 66 | |
---|
| 67 | |
---|
[11423] | 68 | // Add information to the picture's description (The copyright's name) |
---|
[11075] | 69 | include_once(dirname(__FILE__).'/image.php'); |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | /* +-----------------------------------------------------------------------+ |
---|
| 73 | * | Plugin batchmanager | |
---|
| 74 | * +-----------------------------------------------------------------------+ */ |
---|
| 75 | |
---|
[11423] | 76 | |
---|
| 77 | // Global mode |
---|
| 78 | include_once(dirname(__FILE__).'/batch_global.php'); |
---|
[11075] | 79 | |
---|
[11423] | 80 | // Single mode - TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST |
---|
| 81 | // should become a include_once !!! |
---|
| 82 | include(dirname(__FILE__).'/batch_single.php'); |
---|
[11075] | 83 | |
---|
[11423] | 84 | ?> |
---|