source: extensions/Copyrights/main.inc.php @ 20179

Last change on this file since 20179 was 12192, checked in by Mattias, 13 years ago

Fixed a small bug with single quotes in the copyright name
and some very small things

File size: 4.2 KB
Line 
1<?php
2/*
3Plugin Name: Copyrights
4Version: 1.2.a
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/
9*/
10// +-----------------------------------------------------------------------+
11// | Piwigo - a PHP based picture gallery                                  |
12// +-----------------------------------------------------------------------+
13// | Copyright(C) 2008-2011 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// +-----------------------------------------------------------------------+
31
32if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
33
34define('COPYRIGHTS_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/');  // The plugin path
35define('COPYRIGHTS_WEB_PATH', get_root_url().'admin.php?page=plugin-Copyrights'); // The path used in admin.php
36
37global $prefixeTable;
38define('COPYRIGHTS_ADMIN', $prefixeTable.'copyrights_admin'); // The db
39define('COPYRIGHTS_MEDIA', $prefixeTable.'copyrights_media'); // The db
40
41include_once(COPYRIGHTS_PATH . 'include/functions.inc.php');
42
43
44/* +-----------------------------------------------------------------------+
45 * | Plugin admin                                                          |
46 * +-----------------------------------------------------------------------+ */
47
48// Add an entry to the plugins menu
49add_event_handler('get_admin_plugin_menu_links', 'copyrights_admin_menu');
50function copyrights_admin_menu($menu) {
51  array_push(
52    $menu,
53    array(
54      'NAME'  => 'Copyrights',
55      'URL'   => get_admin_plugin_menu_link(dirname(__FILE__)).'/admin.php'
56    )
57  );     
58  return $menu;
59}
60
61
62/* +-----------------------------------------------------------------------+
63 * | Plugin image                                                          |
64 * +-----------------------------------------------------------------------+ */
65
66
67// Add information to the picture's description (The copyright's name)
68include_once(dirname(__FILE__).'/image.php');
69
70
71/* +-----------------------------------------------------------------------+
72 * | Plugin batchmanager                                                   |
73 * +-----------------------------------------------------------------------+ */
74
75// With the batchmanager, copyrights can be assigned to photos. There are two
76// modes: Global mode, for mass assignment; Unit mode, for one by one
77// assignment to the photos.
78
79// The batch manager prefilters
80include_once(dirname(__FILE__).'/filter.php');
81
82// Global mode
83include_once(dirname(__FILE__).'/batch_global.php');
84
85// Unit mode
86include_once(dirname(__FILE__).'/batch_single.php');
87
88/* +-----------------------------------------------------------------------+
89 * | Plugin picture_modify                                                 |
90 * +-----------------------------------------------------------------------+ */
91
92// Add the Copyrights dropdown menu to picture_modify
93include_once(dirname(__FILE__).'/modify.php');
94
95
96?>
Note: See TracBrowser for help on using the repository browser.