source: extensions/Copyrights/main.inc.php

Last change on this file was 32641, checked in by plg, 2 years ago

compatibility with Piwigo 12

File size: 4.2 KB
Line 
1<?php
2/*
3Plugin Name: Copyrights
4Version: auto
5Description: Create copyrights and assign them to your photos.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=537
7Author: Mattias & J.Commelin (Deltaworks Online Foundation) <www.deltaworks.org>
8Author URI: http://www.watergallery.nl/piwigo/plugins/copyrights/
9Has Settings: true
10*/
11// +-----------------------------------------------------------------------+
12// | Piwigo - a PHP based picture gallery                                  |
13// +-----------------------------------------------------------------------+
14// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
15// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
16// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
17// +-----------------------------------------------------------------------+
18// | This program is free software; you can redistribute it and/or modify  |
19// | it under the terms of the GNU General Public License as published by  |
20// | the Free Software Foundation                                          |
21// |                                                                       |
22// | This program is distributed in the hope that it will be useful, but   |
23// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
24// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
25// | General Public License for more details.                              |
26// |                                                                       |
27// | You should have received a copy of the GNU General Public License     |
28// | along with this program; if not, write to the Free Software           |
29// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
30// | USA.                                                                  |
31// +-----------------------------------------------------------------------+
32
33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
34
35define('COPYRIGHTS_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/');  // The plugin path
36define('COPYRIGHTS_WEB_PATH', get_root_url().'admin.php?page=plugin-Copyrights'); // The path used in admin.php
37
38global $prefixeTable;
39define('COPYRIGHTS_ADMIN', $prefixeTable.'copyrights_admin'); // The db
40define('COPYRIGHTS_MEDIA', $prefixeTable.'copyrights_media'); // The db
41
42include_once(COPYRIGHTS_PATH . 'include/functions.inc.php');
43
44
45/* +-----------------------------------------------------------------------+
46 * | Plugin admin                                                          |
47 * +-----------------------------------------------------------------------+ */
48
49// Add an entry to the plugins menu
50add_event_handler('get_admin_plugin_menu_links', 'copyrights_admin_menu');
51function 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
62
63/* +-----------------------------------------------------------------------+
64 * | Plugin image                                                          |
65 * +-----------------------------------------------------------------------+ */
66
67
68// Add information to the picture's description (The copyright's name)
69include_once(dirname(__FILE__).'/image.php');
70
71
72/* +-----------------------------------------------------------------------+
73 * | Plugin batchmanager                                                   |
74 * +-----------------------------------------------------------------------+ */
75
76// With the batchmanager, copyrights can be assigned to photos. There are two
77// modes: Global mode, for mass assignment; Unit mode, for one by one
78// assignment to the photos.
79
80// The batch manager prefilters
81include_once(dirname(__FILE__).'/filter.php');
82
83// Global mode
84include_once(dirname(__FILE__).'/batch_global.php');
85
86// Unit mode
87include_once(dirname(__FILE__).'/batch_single.php');
88
89/* +-----------------------------------------------------------------------+
90 * | Plugin picture_modify                                                 |
91 * +-----------------------------------------------------------------------+ */
92
93// Add the Copyrights dropdown menu to picture_modify
94include_once(dirname(__FILE__).'/modify.php');
95
96
97?>
Note: See TracBrowser for help on using the repository browser.