Title: Registration Passkey Hack
Author: Xian
Version: 1.0
Revision Date: 09/16/2017
------------------------------------------------------------------------------------------------------------------------
Compatibility: 1.9.11.13, 1.9.12 BETA
------------------------------------------------------------------------------------------------------------------------
Description:
This hack allows for your board to have a passkey in order for a member to register. When a guest clicks on the Register link they are first
presented with a form to type in a passkey to see the registration form.
------------------------------------------------------------------------------------------------------------------------
Installation:
1. Backup your XMB installation files and Database.
2. Upload secured.php file and [secured] folder to the root of your installation directory.
3. Open cp.php
4. Find:
$remoteimageson = $remoteimagesoff = '';
settingHTML('attach_remote_images', $remoteimageson, $remoteimagesoff);
5. Add below:
$passkey_statuson = $passkey_statusoff = '';
settingHTML('passkey_status', $passkey_statuson, $passkey_statusoff);
$passkey_user_useron = $passkey_user_useroff = '';
settingHTML('passkey_use_user', $passkey_user_useron, $passkey_user_useroff);
6. Find:
printsetting1($lang['reg_on'], 'reg_on', $regon, $regoff);
7. Add below:
printsetting1($lang['passkey_status'], 'passkey_statusnew', $passkey_statuson, $passkey_statusoff);
printsetting1($lang['passkey_use_user'], 'passkey_use_usernew', $passkey_user_useron, $passkey_user_useroff);
printsetting2($lang['passkey_username'], 'passkey_usernamenew', $SETTINGS['passkey_username'], 32);
printsetting2($lang['passkey_phrase'], 'passkey_phrasenew', $SETTINGS['passkey_key'], 32);
8. Find:
$remoteimages = formOnOff('remoteimages');
9. Add below:
$passkey_statusnew = formOnOff('passkey_statusnew');
$passkey_user_usernew = formOnOff('passkey_use_usernew');
$passkey_usernamenew = postedVar('passkey_usernamenew');
$passkey_phrasenew = postedVar('passkey_phrasenew');
10. Find:
max_thumb_size='$max_thumb_size'
11. Change to: (add comma at the end)
max_thumb_size='$max_thumb_size',
12. Then add below:
passkey_status='$passkey_statusnew',
passkey_use_user='$passkey_use_usernew',
passkey_username='$passkey_usernamenew',
passkey_key='$passkey_phrasenew'
13. Save cp.php file.
14. Open member.php
15. Find:
} elseif (noSubmit('regsubmit')) {
16. Add below:
if ($SETTINGS['passkey_status'] == 'on') {
require_once('secured.php');
}
17. Save member.php
18. Login to your Administration Panel.
19. Click "Translations"
20. Click "Download" on the "English" Language if that is the language you are using.
21. Open the lang file you've just downloaded.
22. All the way at the bottom add:
$lang['passkey_status'] = "Passkey Status:";
$lang['passkey_use_user'] = "Use username?";
$lang['passkey_username'] = "Passkey Username:";
$lang['passkey_phrase'] = "Passkey Phrase:";
23. Make sure you leave one (carriage) return space after the last line.
(i.e. after you paste the code put your cursor at the end of this line $lang['passkey_phrase'] = "Passkey Phrase:"; and press enter)
24. Save the lang file.
25. Back to your Administration Panel.
26. Click "Choose File"
27. Select the Lang File you just edited.
28. Click "Install New Language".
29. Still in your Administration Panel.
30. Click "Insert Raw SQL"
31. Paste this into the box:
ALTER TABLE $table_settings ADD passkey_status SET('on','off') NOT NULL, ADD passkey_use_user SET('on','off') NOT NULL, ADD passkey_username
VARCHAR(32) NOT NULL, ADD passkey_key VARCHAR(32) NOT NULL;
32. Now click "Settings" in your Administration Panel
33. You will find these settings under the "User Control" section below "Allow User Registration".
------------------------------------------------------------------------------------------------------------------------
### SETTINGS LEGEND ###
Passkey Status: ON/OFF Turn Registration Passkey on or off.
Use Username? ON/OFF Use a username as well as a passkey.
Passkey Username: Username to use with the Validation form. (ignored if "Use Username" is set to OFF)
Passkey Phrase: Phrase to validate registration form.
------------------------------------------------------------------------------------------------------------------------
You can stylize the form the way you want to to match your own board.
Attachment:
XMB 1.9.x Registration Passkey Hack.zip (56kB)
This file has been downloaded 56 times