1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Register FluxBB |
---|
4 | Version: auto |
---|
5 | Description: Link user registration from Piwigo to FluxBB forum (registration, password changing, deletion) |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=252 |
---|
7 | Author: Eric |
---|
8 | Author URI: http://www.infernoweb.net |
---|
9 | */ |
---|
10 | |
---|
11 | /* |
---|
12 | -------------------------------------------------------------------------------- |
---|
13 | Author : Eric |
---|
14 | email : lucifer@infernoweb.net |
---|
15 | website : http://www.infernoweb.net |
---|
16 | PWG user : http://forum.phpwebgallery.net/profile.php?id=1106 |
---|
17 | -------------------------------------------------------------------------------- |
---|
18 | |
---|
19 | :: HISTORY |
---|
20 | |
---|
21 | 2.0.0b - 23/11/08 - Initial release. Basic changes to be available for Piwigo 2.0RC4 |
---|
22 | |
---|
23 | 2.0.1b - 24/11/08 - Small bug correction on submit button display |
---|
24 | |
---|
25 | 2.0.2 - 19/02/09 - Language pack correction |
---|
26 | |
---|
27 | 2.1.0 - 25/04/09 - Admin panel with tabsheets |
---|
28 | - Radio buttons functionnalities corrections (now radio buttons show the configuration saved in database) |
---|
29 | - Language files (fr - en) improvement |
---|
30 | |
---|
31 | 2.1.1 - 30/04/09 - Bug fixed on profile update |
---|
32 | |
---|
33 | 2.1.2 - 22/08/09 - Compatibility bug fixed when used with DynamicRecentPeriod plugin |
---|
34 | |
---|
35 | 2.1.3 - 16/11/09 - Using sha1 hash instead of md5 for password hashing in FluxBB |
---|
36 | - Escaping all characters in login names and be able to retreive them without slashes - FluxBB does not allow this so Piwigo's user names with escaped characters will not been escaped in FluxBB (ie : "it's" in Piwigo will be "It\'s" in FluxBB) |
---|
37 | - Code refactoring |
---|
38 | - Full HTML 4.0 for tpl |
---|
39 | |
---|
40 | 2.2.0 - 03/04/10 - Piwigo 2.1 compatibility |
---|
41 | - Adding css file |
---|
42 | - Templates refactory: Moved with css in a "template" subdirectory of admin directory, Moving icons in template directory, using css rules to improve important text display |
---|
43 | - functions_Register_FluxBB.inc.php renamed in functions.inc.php |
---|
44 | - Language files revision |
---|
45 | - Obsolete files management |
---|
46 | |
---|
47 | 2.2.1 - 04/04/10 - Bug 1577 fixed : Multiple database support |
---|
48 | |
---|
49 | 2.2.2 - 23/05/10 - Bug 1674 fixed : Adding of mods for Fluxbb when users loose their password |
---|
50 | - Adding of German language (Thx to duke) |
---|
51 | |
---|
52 | 2.2.3 - 23/05/10 - Bug 1674 re-fixed : Bad link fixed |
---|
53 | - Re-adding of German language that was missed at last release :-( (Thx to duke) |
---|
54 | |
---|
55 | 2.2.4 - 22/08/10 - Bug 1812 fixed : Compliance with FluxBB 1.4 |
---|
56 | |
---|
57 | 2.3.0 - 28/08/10 - Bug 1434 fixed : Bridge between Register_FluxBB and UserAdvManager for new users validation |
---|
58 | |
---|
59 | 2.3.1 - 31/08/10 - Bug 1825 fixed : Password corruption after Piwigo's profile page visit |
---|
60 | |
---|
61 | 2.3.2 - 11/09/10 - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation |
---|
62 | |
---|
63 | 2.3.3 - 13/09/10 - Bug 1853 fixed : Add of controls on plugin configuration settings to avoid some mistakes |
---|
64 | - Bug 1855 fixed : Improvement of use of UAM bridge (fixes php notices) |
---|
65 | - Several language files fix |
---|
66 | |
---|
67 | 2.3.4 - 22/09/10 - Compatibility with Plugin Adult_Content |
---|
68 | |
---|
69 | 2.3.5 - 02/12/10 - Bug 2047 fixed : Check case sensitivity for logins in FluxBB's user table |
---|
70 | - Code refactory and optimization |
---|
71 | |
---|
72 | 2.3.6 - 08/12/10 - Bug 2051 fixed : Compatibility with Captcha |
---|
73 | |
---|
74 | 2.3.7 - 31/01/11 - Bug 2154 fixed : Bad fluxbb table name |
---|
75 | |
---|
76 | 2.4.0 - 26/03/11 - Compliance with Piwigo 2.2 |
---|
77 | |
---|
78 | 2.4.1 - 29/03/11 - Enhanced compliance with Piwigo 2.2 (using combine_css) |
---|
79 | |
---|
80 | 2.4.2 - 02/04/11 - Bug fixed on previous version update |
---|
81 | |
---|
82 | 2.4.3 - 26/04/11 - Small CSS bug fixed |
---|
83 | |
---|
84 | 2.4.4 - 11/05/12 - Small code refactory |
---|
85 | Compatibility with Piwigo 2.4 and FluxBB 1.5 verifyed |
---|
86 | |
---|
87 | 2.4.5 - 13/05/12 - Update translations - Thx to ddtddt |
---|
88 | |
---|
89 | 2.4.6 - 16/06/12 - Add it_IT, thanks to : Gdvpixel and Ericnet |
---|
90 | - Add uk_UA, thanks to : animan |
---|
91 | - Add ru_RU, thanks to : nadusha |
---|
92 | |
---|
93 | 2.4.7 - 06/08/12 - Update it_IT, thanks to : Ericnet |
---|
94 | - Update ru_RU, thanks to : rocket |
---|
95 | - Add cs_CZ - Česky – Czech, Thanks to : webprostor |
---|
96 | - Update uk_UA, thanks to : animan |
---|
97 | - Update el_GR, thanks to : bas_alba |
---|
98 | |
---|
99 | 2.4.8 - 05/10/12 - Update uk_UA, thanks to : animan |
---|
100 | - Update it_IT, thanks to : virgigiole |
---|
101 | - Add da_DK, thanks to : Kaare |
---|
102 | - Add es_ES, thanks to : petaqui |
---|
103 | |
---|
104 | 2.4.9 - 22/11/12 - Update es_ES, thanks to : jpr928 |
---|
105 | - Update tr_TR, thanks to : LazBoy |
---|
106 | - Update it_IT, thanks to : virgigiole |
---|
107 | - Update pl_PL, thanks to : kuba |
---|
108 | - Bad explanation in inline tips fixed |
---|
109 | -------------------------------------------------------------------------------- |
---|
110 | */ |
---|
111 | |
---|
112 | // pour faciliter le debug - make debug easier :o) |
---|
113 | //ini_set('error_reporting', E_ALL); |
---|
114 | //ini_set('display_errors', true); |
---|
115 | |
---|
116 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
117 | |
---|
118 | if (!defined('REGFLUXBB_PATH')) define('REGFLUXBB_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
119 | |
---|
120 | include_once (REGFLUXBB_PATH.'include/constants.php'); |
---|
121 | include_once (REGFLUXBB_PATH.'include/functions.inc.php'); |
---|
122 | |
---|
123 | |
---|
124 | /* plugin administration */ |
---|
125 | add_event_handler('get_admin_plugin_menu_links', 'Register_FluxBB_admin_menu'); |
---|
126 | |
---|
127 | |
---|
128 | /* user creation*/ |
---|
129 | add_event_handler('register_user', 'Register_FluxBB_Adduser'); |
---|
130 | |
---|
131 | |
---|
132 | // Check users registration |
---|
133 | add_event_handler('register_user_check', 'Register_FluxBB_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
134 | |
---|
135 | |
---|
136 | /* user deletion */ |
---|
137 | add_event_handler('delete_user', 'Register_FluxBB_Deluser'); |
---|
138 | |
---|
139 | |
---|
140 | /* Profile management */ |
---|
141 | if (script_basename() == 'profile') |
---|
142 | { |
---|
143 | add_event_handler('loc_begin_profile', 'Register_FluxBB_InitPage', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
144 | } |
---|
145 | |
---|
146 | |
---|
147 | /* Access validation in FluxBB when validated in Piwigo through UAM plugin */ |
---|
148 | add_event_handler('login_success', 'UAM_Bridge', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
149 | |
---|
150 | ?> |
---|