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

Last change on this file since 31894 was 23905, checked in by Eric, 11 years ago

Next version is 2.5.13:
Compatibility fixed with other plugins (UAM and Prune_History)
Update da_DK, thanks to : Kaare
Update de_DE, thanks to : stephy and Yogie
Update el_GR, thanks to : bas_alba
Update es_ES, thanks to : jpr928
Update tr_TR, thanks to : LazBoy
Update lv_LV, thanks to : agrisans
Update it_IT, thanks to : Ericnet
Update uk_UA, thanks to : tb0hdan
Update pt_BR, thanks to : flaviove

  • Property svn:eol-style set to LF
File size: 2.4 KB
RevLine 
[17457]1<?php
2/*
3Plugin Name: Register FluxBB
[18490]4Version: auto
[17457]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
[22204]13// +-----------------------------------------------------------------------+
14// | Define plugin constants                                               |
15// +-----------------------------------------------------------------------+
[17457]16
[22204]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
[17457]21include_once (REGFLUXBB_PATH.'include/constants.php');
22include_once (REGFLUXBB_PATH.'include/functions.inc.php');
23
[22091]24load_language('plugin.lang', REGFLUXBB_PATH);
[17457]25
[22205]26/* plugin administration */
[17457]27add_event_handler('get_admin_plugin_menu_links', 'Register_FluxBB_admin_menu');
28
[22204]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    );
[17457]41
[22204]42  return $menu;
43}
[17457]44
45
[22204]46/* user creation */
47if (strpos(@$_GET['page'],'Register_FluxBB') === false) // Exclude user creation from plugin panel to make FluxBB2Piwigo synch available
48{
[22205]49  add_event_handler('register_user', 'Register_FluxBB_Adduser');
[22204]50}
51
52
[17457]53// Check users registration
[22204]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}
[17457]58
59
60/* user deletion */
61add_event_handler('delete_user', 'Register_FluxBB_Deluser');
62
[22091]63// Redirection to profile page
64// ---------------------------
[23905]65add_event_handler('login_success', 'Register_FluxBB_Login', EVENT_HANDLER_PRIORITY_NEUTRAL, 10);
[17457]66
67/* Profile management */
68if (script_basename() == 'profile')
69{
[22091]70  add_event_handler('loc_begin_profile', 'Register_FluxBB_InitProfile', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
[17457]71}
72
[22039]73/* Password forget */
74add_event_handler('loc_begin_password', 'Register_FluxBB_PasswReset');
[17457]75
76/* Access validation in FluxBB when validated in Piwigo through UAM plugin */
[23905]77add_event_handler('login_success', 'UAM_Bridge', EVENT_HANDLER_PRIORITY_NEUTRAL, 20);
[17457]78
79?>
Note: See TracBrowser for help on using the repository browser.