XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Registration Passkey Hack
Xian
Member
***




Posts: 50
Registered: 9-12-2017
Location: Los Angeles, California
Member Is Offline

Mood: w00h00!

[*] posted on 9-16-2017 at 07:31 AM
Registration Passkey Hack


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

View user's profile View All Posts By User
Scarlet
Member
***




Posts: 60
Registered: 9-15-2017
Location: England
Member Is Offline

Mood: Excited for XMB's resurrection!

[*] posted on 9-16-2017 at 07:35 AM


Wow, thanks! I appreciate truly the fact you went and done this for me :)
Private forums and small communities would benefit from his hack in my opinion ^_^
View user's profile View All Posts By User This user has MSN Messenger
lottos
Administrator
********




Posts: 477
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 9-16-2017 at 07:38 AM


That was quick!

I'd better put my request in! :)



View user's profile View All Posts By User
Xian
Member
***




Posts: 50
Registered: 9-12-2017
Location: Los Angeles, California
Member Is Offline

Mood: w00h00!

[*] posted on 9-16-2017 at 07:38 AM


You are most welcome. I actually made this hack a while ago as I needed it for a different purpose. I just re-coded it to fit your needs. I hope it is useful to others.

Good luck! Let us know if you run in to troubles installing it.
View user's profile View All Posts By User
Scarlet
Member
***




Posts: 60
Registered: 9-15-2017
Location: England
Member Is Offline

Mood: Excited for XMB's resurrection!

[*] posted on 9-16-2017 at 07:41 AM


Ah, that's pretty neat. Just curious, what were you using it for? :)
View user's profile View All Posts By User This user has MSN Messenger
Xian
Member
***




Posts: 50
Registered: 9-12-2017
Location: Los Angeles, California
Member Is Offline

Mood: w00h00!

[*] posted on 9-16-2017 at 07:44 AM


Quote: Originally posted by Scarlet  
Ah, that's pretty neat. Just curious, what were you using it for? :)


I had online forms and surveys that needed to be protected so that the general public couldn't just fill them out. It had to be password protected so that only the people I gave the passcode to can fill out the forms and surveys.

I just didn't think it would come in handy for someone else.

But I'm glad it did!
View user's profile View All Posts By User
Scarlet
Member
***




Posts: 60
Registered: 9-15-2017
Location: England
Member Is Offline

Mood: Excited for XMB's resurrection!

[*] posted on 9-16-2017 at 10:34 AM


I'm having an error after turning on debug mode:

MySQL encountered the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'passkey_status='off',
passkey_use_user='off',
passkey_username='',
passkey_ke' at line 79(errno = 1064)
View user's profile View All Posts By User This user has MSN Messenger
Xian
Member
***




Posts: 50
Registered: 9-12-2017
Location: Los Angeles, California
Member Is Offline

Mood: w00h00!

[*] posted on 9-16-2017 at 01:53 PM


Quote: Originally posted by Scarlet  
I'm having an error after turning on debug mode:

MySQL encountered the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'passkey_status='off',
passkey_use_user='off',
passkey_username='',
passkey_ke' at line 79(errno = 1064)


What are you doing when this error occurs? Please attach a copy of your cp.php file.
View user's profile View All Posts By User
Scarlet
Member
***




Posts: 60
Registered: 9-15-2017
Location: England
Member Is Offline

Mood: Excited for XMB's resurrection!

[*] posted on 9-16-2017 at 02:13 PM


Ah, you made a mistake in the SQL query by taking away the comma here:

max_thumb_size='$max_thumb_size',

I added it back and then it decided to work fine, the passkey is working and also nice webpage that it displays :)
View user's profile View All Posts By User This user has MSN Messenger
Xian
Member
***




Posts: 50
Registered: 9-12-2017
Location: Los Angeles, California
Member Is Offline

Mood: w00h00!

[*] posted on 9-16-2017 at 02:23 PM


Quote: Originally posted by Scarlet  
Ah, you made a mistake in the SQL query by taking away the comma here:

max_thumb_size='$max_thumb_size',

I added it back and then it decided to work fine, the passkey is working and also nice webpage that it displays :)


Good find. I meant to do the opposite. Is to add a comma. I will correct the instrucitons.

Glad it works for ya!
View user's profile View All Posts By User
Scarlet
Member
***




Posts: 60
Registered: 9-15-2017
Location: England
Member Is Offline

Mood: Excited for XMB's resurrection!

[*] posted on 9-16-2017 at 08:28 PM


Yeah, again thanks for accepting my request, you're one amazing person for showing such interest in XMB. :3
View user's profile View All Posts By User This user has MSN Messenger
Xian
Member
***




Posts: 50
Registered: 9-12-2017
Location: Los Angeles, California
Member Is Offline

Mood: w00h00!

[*] posted on 9-16-2017 at 10:50 PM


Quote: Originally posted by Scarlet  
Yeah, again thanks for accepting my request, you're one amazing person for showing such interest in XMB. :3


You're welcome! I've always loved XMB since the 1.6 days when I first started using it. Whew! That was a long time ago. :ninja:
View user's profile View All Posts By User
Scarlet
Member
***




Posts: 60
Registered: 9-15-2017
Location: England
Member Is Offline

Mood: Excited for XMB's resurrection!

[*] posted on 9-18-2017 at 06:54 AM


Haha, I'm a noob here as I've only used it since 2016 but loved the speed and simplicity of the software.
View user's profile View All Posts By User This user has MSN Messenger

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 33.3% - SQL: 66.7%]