source: extensions/Photo_add_by/main.inc.php

Last change on this file was 32916, checked in by ddtddt, 15 months ago

[Photo_add_by] check php8

File size: 2.7 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/
9Has Settings: webmaster
10*/
11
12// +-----------------------------------------------------------------------+
13// | Photo added by plugin for Piwigo  by TEMMII                           |
14// +-----------------------------------------------------------------------+
15// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
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
34global $prefixeTable, $pwg_loaded_plugins;
35
36define('PAB_DIR' , basename(dirname(__FILE__)));
37define('PAB_PATH' , PHPWG_PLUGINS_PATH . PAB_DIR . '/');
38define('PAB_ADMIN',get_root_url().'admin.php?page=plugin-'.PAB_DIR);
39
40add_event_handler('loading_lang', 'Photo_added_by_loading_lang');         
41function Photo_added_by_loading_lang(){
42  load_language('plugin.lang', PAB_ADMIN);
43}
44
45 // Plugin on picture page
46if (script_basename() == 'picture'){ 
47  include_once(dirname(__FILE__).'/initpicture.php');
48}
49
50// Plugin for admin
51if (script_basename() == 'admin') {
52    include_once(dirname(__FILE__) . '/initadmin.php');
53}
54
55// menu admin
56/*
57add_event_handler('get_admin_plugin_menu_links', 'PAB_admin_menu');
58function PAB_admin_menu($menu){
59        global $pwg_loaded_plugins;
60  if (is_webmaster()){
61        if(isset($pwg_loaded_plugins['manage_properties_photos'])){}else{
62                $menu[] = array(
63                        'NAME' => l10n('Photo added by'),
64                        'URL' => PAB_ADMIN,
65                );
66        }
67  }
68  return $menu;
69}
70*/
71?>
Note: See TracBrowser for help on using the repository browser.