source: extensions/Photo_add_by/main.inc.php @ 31645

Last change on this file since 31645 was 31465, checked in by ddtddt, 9 years ago

[extensions] - Photo_add_by - 2.8

File size: 2.4 KB
Line 
1<?php
2/*
3Plugin Name: Photo added by
4Version: auto
5Description: Add who added photo on photo page
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=621
7Author: ddtddt
8Author URI: http://temmii.com/piwigo/
9*/
10
11// +-----------------------------------------------------------------------+
12// | Photo added by plugin for Piwigo                                      |
13// +-----------------------------------------------------------------------+
14// | Copyright(C) 2012-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
31if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
32
33global $prefixeTable;
34
35define('PAB_DIR' , basename(dirname(__FILE__)));
36define('PAB_PATH' , PHPWG_PLUGINS_PATH . PAB_DIR . '/');
37define('PAB_ADMIN',get_root_url().'admin.php?page=plugin-'.PAB_DIR);
38
39add_event_handler('loading_lang', 'Photo_added_by_loading_lang');         
40function Photo_added_by_loading_lang(){
41  load_language('plugin.lang', PAB_ADMIN);
42}
43
44 // Plugin on picture page
45if (script_basename() == 'picture'){ 
46  include_once(dirname(__FILE__).'/initpicture.php');
47}
48
49// menu admin
50add_event_handler('get_admin_plugin_menu_links', 'PAB_admin_menu');
51function PAB_admin_menu($menu){
52  $menu[] = array(
53    'NAME' => l10n('Photo added by'),
54    'URL' => PAB_ADMIN,
55  );
56  return $menu;
57}
58
59?>
Note: See TracBrowser for help on using the repository browser.