source: extensions/Extended_author/main.inc.php @ 32451

Last change on this file since 32451 was 11846, checked in by Mattias, 13 years ago

Fixed another bug in maintain.inc.php

it works now :-/

File size: 4.2 KB
Line 
1<?php
2/*
3Plugin Name: Extended author
4Version: 1.0.2
5Description: Provide information about authors and default copyright (Copyrights plugin is nescessary).
6Plugin URI: http://piwigo.org/ext/revision_add.php?eid=571
7Author: Mattias & J.Commelin (Deltaworks Online Foundation) <www.deltaworks.org>
8*/
9// +-----------------------------------------------------------------------+
10// | Piwigo - a PHP based picture gallery                                  |
11// +-----------------------------------------------------------------------+
12// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
13// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
14// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
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
31if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
32
33define('E_AUTHOR_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/');           // The plugin path
34define('E_AUTHOR_WEB_PATH', get_root_url().'admin.php?page=plugin-Extended_author'); // The path used in admin.php
35
36global $prefixeTable;
37define('AUTHORS', $prefixeTable.'author_extended');                             // The db
38define('IMAGES', $prefixeTable.'images');                                               // The db
39//define('EA_COPYRIGHTS_MEDIA', $prefixeTable.'copyrights_media');      // The db
40//define('EA_COPYRIGHTS_ADMIN', $prefixeTable.'copyrights_admin');      // The db
41
42include_once(E_AUTHOR_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', 'e_author_admin_menu');
51function e_author_admin_menu($menu) {
52  array_push(
53    $menu,
54    array(
55      'NAME'  => 'Extended author',
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// Add the author information to the picture's description
68include_once(dirname(__FILE__).'/image.php');
69
70
71/* +-----------------------------------------------------------------------+
72 * | Plugin batchmanager                                                   |
73 * +-----------------------------------------------------------------------+ */
74
75// With the batchmanager, authors 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// Global mode
80include_once(dirname(__FILE__).'/batch_global.php');
81
82// Unit mode
83include_once(dirname(__FILE__).'/batch_single.php');
84
85
86/* +-----------------------------------------------------------------------+
87 * | Plugin picture_modify                                                 |
88 * +-----------------------------------------------------------------------+ */
89
90// Add the author dropdown menu to picture_modify
91include_once(dirname(__FILE__).'/modify.php');
92
93
94?>
Note: See TracBrowser for help on using the repository browser.