source: extensions/user_custom_fields/main.inc.php @ 31969

Last change on this file since 31969 was 31841, checked in by ddtddt, 7 years ago

[extensions] - user_custom_fields - Add import data plugin AddInfoUser

File size: 2.6 KB
Line 
1<?php
2/*
3Plugin Name: User Custom Fields
4Version: auto
5Description: Add User Custom Fields
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=833
7Author: ddtddt
8Author URI: http://temmii.com/piwigo/
9*/
10
11// +-----------------------------------------------------------------------+
12// | User Custom Fields plugin for Piwigo                                  |
13// +-----------------------------------------------------------------------+
14// | Copyright(C) 2016-2017 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
31
32if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
33
34global $prefixeTable;
35
36define('UCF_DIR' , basename(dirname(__FILE__)));
37define('UCF_PATH' , PHPWG_PLUGINS_PATH . UCF_DIR . '/');
38if (!defined('UCF_TABLE')) define('UCF_TABLE', $prefixeTable.'user_custom_fields');
39if (!defined('UCFD_TABLE')) define('UCFD_TABLE', $prefixeTable.'user_custom_fields_data');
40define('UCF_ADMIN',get_root_url().'admin.php?page=plugin-'.UCF_DIR);
41
42include_once(UCF_PATH . 'include/function.inc.php');
43
44add_event_handler('loading_lang', 'user_custom_fields_loading_lang');     
45function user_custom_fields_loading_lang(){
46  load_language('plugin.lang', UCF_PATH);
47}
48
49 //plugin on register
50if (script_basename() == 'register')
51{ 
52 include_once(dirname(__FILE__).'/initregister.php');
53}
54// Plugin on profile page
55if (script_basename() == 'profile') 
56{ 
57 include_once(dirname(__FILE__).'/initprofile.php');
58}
59
60  // Plugin for admin
61if (script_basename() == 'admin')   
62{
63  include_once(dirname(__FILE__).'/initadmin.php');
64}
65
66?>
Note: See TracBrowser for help on using the repository browser.