source: extensions/Register_FluxBB/main.inc.php @ 22205

Last change on this file since 22205 was 22205, checked in by Eric, 12 years ago

Version 2.5.9 (rebuild):
Fix corrupted en_UK/plugin.lang.php file (corruption from translation tool)

  • Property svn:eol-style set to LF
File size: 2.4 KB
Line 
1<?php
2/*
3Plugin Name: Register FluxBB
4Version: auto
5Description: Link user registration from Piwigo to FluxBB forum (registration, password changing, deletion)
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=252
7Author: Eric
8Author URI: http://www.infernoweb.net
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13// +-----------------------------------------------------------------------+
14// | Define plugin constants                                               |
15// +-----------------------------------------------------------------------+
16
17defined('REGFLUXBB_ID') or define('REGFLUXBB_ID', basename(dirname(__FILE__)));
18define('REGFLUXBB_PATH' ,   PHPWG_PLUGINS_PATH . REGFLUXBB_ID . '/');
19define('REGFLUXBB_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . REGFLUXBB_ID);
20
21include_once (REGFLUXBB_PATH.'include/constants.php');
22include_once (REGFLUXBB_PATH.'include/functions.inc.php');
23
24load_language('plugin.lang', REGFLUXBB_PATH);
25
26/* plugin administration */
27add_event_handler('get_admin_plugin_menu_links', 'Register_FluxBB_admin_menu');
28
29/**
30 * admin plugins menu link
31 */
32function Register_FluxBB_admin_menu($menu) 
33{
34  array_push(
35    $menu,
36    array(
37      'NAME' => 'Register FluxBB',
38      'URL' => REGFLUXBB_ADMIN,
39      )
40    );
41
42  return $menu;
43}
44
45
46/* user creation */
47if (strpos(@$_GET['page'],'Register_FluxBB') === false) // Exclude user creation from plugin panel to make FluxBB2Piwigo synch available
48{
49  add_event_handler('register_user', 'Register_FluxBB_Adduser');
50}
51
52
53// Check users registration
54if (strpos(@$_GET['page'],'Register_FluxBB') === false) // Exclude user creation from plugin panel to make FluxBB2Piwigo synch available
55{
56  add_event_handler('register_user_check', 'Register_FluxBB_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
57}
58
59
60/* user deletion */
61add_event_handler('delete_user', 'Register_FluxBB_Deluser');
62
63// Redirection to profile page
64// ---------------------------
65add_event_handler('login_success', 'Register_FluxBB_Login');
66
67/* Profile management */
68if (script_basename() == 'profile')
69{
70  add_event_handler('loc_begin_profile', 'Register_FluxBB_InitProfile', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
71}
72
73/* Password forget */
74add_event_handler('loc_begin_password', 'Register_FluxBB_PasswReset');
75
76/* Access validation in FluxBB when validated in Piwigo through UAM plugin */
77add_event_handler('login_success', 'UAM_Bridge', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
78
79?>
Note: See TracBrowser for help on using the repository browser.