Make sure people read the registration agreement.

Started by Tristan Perry, October 31, 2004, 12:35:20 PM

Previous topic - Next topic

Tristan Perry

Hello,
  I was getting tired of people skipping the registration agreement (Which has my forum rules in it) and then asking a question about the forum rules. To prevent this, I made this small mod that stops people from not reading the board registration agreement.

In Register.template.php
Find:

<div align="center">
<input type="submit" name="regSubmit" value="', $txt[97], '" />
</div>


Replace with:
<div align="center">
<input type="hidden" name="time" value="'. time() . '" />
<input type="submit" name="regSubmit" value="', $txt[97], '" />
</div>


In /Sources/Register.php
IN SMF 1.1 Find:

// Collect all extra registration fields someone might have filled in.

WHILE IN SMF 1.0 Find:
// Trim any whitespace from the username.

Add above it:
// Read the registration agreement!
if ( !empty($modSettings['requireAgreement']) )
{
if( ( time() - $_POST['time'] ) < 20 )
fatal_error('
Congratulations! You just broken the Official World record for speed-reading!
Actually, we know you didn\'t read the forum rules, so please do so before continuing.
<br /><br />Please click <a href="', $scripturl, '?action=register">here</a> to re-register.',false);
}




All done. This shows an error message if people take less than 20 seconds registering. To change the amount of time before the error message isn't shown:

Find:
if( ( time() - $_POST['time'] ) < 20 )

And replace the number '20' with the amount of seconds you want. Also the error message may not be what you want to show to your new members, so change the part that says:

QuoteCongratulations! You just broken the Official World record for speed-reading!
      Actually, we know you didn\'t read the forum rules, so please do so before continuing.
      <br /><br />Please click <a href="'.$scripturl.'index.php?action=register">here</a> to re-register.

To what you want to say  :)
I hope this helps,
Tau Online.Org

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

A.M.A

Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Nederland

Very nice, i think i will use it on my board, thx again!

Tristan Perry

#4
Quote from: Owdy on October 31, 2004, 12:49:50 PM
Heh, nice one. I have to try this :)
Quote from: A.M.A on October 31, 2004, 12:54:01 PM
Indeed, a nice and clever tip Tau Online
Thanks, I appreciate it  :)
Quote from: Nederland on November 01, 2004, 08:09:05 AM
Very nice, i think i will use it on my board, thx again!
Thanks, and your welcome  :)

Trekkie101

Im gonna use this all the time, this is great, and plus gets them everytime.

Tristan Perry

Quote from: Trekkie101 on November 01, 2004, 12:45:51 PM
Im gonna use this all the time, this is great, and plus gets them everytime.
lol! Thanks  :)

Peter Duggan

Quote from: Trekkie101 on November 01, 2004, 12:45:51 PM
Im gonna use this all the time, this is great, and plus gets them everytime.

Perhaps I'll register at all your forums and pour myself a drink while you think I'm reading the agreement! >:D

Ben_S

Personally, I never read a registration agreement, and forcing a time to wait won't make me, I'll either go and surf on another tab then come back, or just leave fully.

People just generally don't do reading agreements, they should, but they don't.
Liverpool FC Forum with 14 million+ posts.

Oldiesmann

The default registration agreement is a bit lengthy, and I rarely read those things, but this is a neat trick. I love the error message too. :)
Michael Eshom
Christian Metal Fans

Tristan Perry

Quote from: Ben_S on November 01, 2004, 04:36:42 PM
Personally, I never read a registration agreement, and forcing a time to wait won't make me, I'll either go and surf on another tab then come back, or just leave fully.

People just generally don't do reading agreements, they should, but they don't.
Quote from: Oldiesmann on November 02, 2004, 10:38:57 AM
The default registration agreement is a bit lengthy, and I rarely read those things, but this is a neat trick. I love the error message too. :)
Bah! Spolit-sports  :P Just joking. Thanks for the compliments Olidesmann :)

Winters

Hello Tau,

I implemented this, but it does not seem to work. Could it be that our using a RC1 theme is not compatible? (The rest has been updated to RC2. Link: http://forum.dykesvision.com . We have set it so registrations must be approved.)

Tristan Perry

Quote from: Winters on November 06, 2004, 03:59:43 PM
Hello Tau,

I implemented this, but it does not seem to work. Could it be that our using a RC1 theme is not compatible? (The rest has been updated to RC2. Link: http://forum.dykesvision.com . We have set it so registrations must be approved.)
Strange, you've edited the right part of Regsiter.template.php, are you sure you've edited the /Sources/Register.php file? From the looks of things you haven't, otherwise the error message would be shown.. Could you please re-try to the steps for editing the Regsiter.php source file, and then see if this works?

Winters

#13
Tau,

thanks for your reply. I re-did the steps and yes, I did edit register.php. Still...

I'm beginning to think I must have made a really stupid mistake, but I can't figure our which one... Should I chmod anything, btw.?

Tristan Perry

#14
Quote from: Winters on November 07, 2004, 03:52:19 PM
Tau,

thanks for your reply. I re-did the steps and yes, I did edit register.php. Still...

I'm beginning to think I must have made a really stupid mistake, but I can't figure our which one... Should I chmod anything, btw.?
That's very odd.. nothing has changed from RC1 to RC2 that would prevent this from working... could you PM me your FTP details so I can make this work? If you don't feel comfortable doing that (I understand if you do!) then could you send me your Register.php file so I can take a better look at things? The fact that you aren't getting any parse errors seems to suggest you haven't copied it correctly, or pu tit in the wrong place, but I can't be certain about that..

Winters

Quote from: Tau Online on November 07, 2004, 04:23:51 PM
Quote from: Winters on November 07, 2004, 03:52:19 PM
Tau,

thanks for your reply. I re-did the steps and yes, I did edit register.php. Still...

I'm beginning to think I must have made a really stupid mistake, but I can't figure our which one... Should I chmod anything, btw.?
That's very odd.. nothing has changed from RC1 to RC2 that would prevent this from working... could you PM me your FTP details so I can make this work? If you don't feel comfortable doing that (I understand if you do!) then could you send me your Register.php file so I can take a better look at things? The fact that you aren't getting any parse errors seems to suggest you haven't copied it correctly, or pu tit in the wrong place, but I can't be certain about that..

Actually, the wrong place could be a good guess, as I do remember not finding a file which was supposed to be somewhere (very accurate, huh?). I'll send you the ftp details; however, this is a sort of test run, I mean, the forum is online, but the forum I'd like to implement this in is actually alive, so I would need you tell me  what went wrong  here?

Tristan Perry

#16
Quote from: Winters on November 09, 2004, 04:15:15 PM
Actually, the wrong place could be a good guess, as I do remember not finding a file which was supposed to be somewhere (very accurate, huh?). I'll send you the ftp details; however, this is a sort of test run, I mean, the forum is online, but the forum I'd like to implement this in is actually alive, so I would need you tell me  what went wrong  here?

I've recieved your FTP details, I'll get this up working soon, I have to go offline in a second, so I'll give this a go tommorow.

TarantinoArchives

tau, can you make a mod/package for this? would be awesome

Tristan Perry

Quote from: TarantinoArchives on November 20, 2004, 12:09:53 PM
tau, can you make a mod/package for this? would be awesome
It's really too small to warrant a mod status, also I don't know how to make mods!

HoTmetal

#19
Great, now I can add the part about owning their sole & it will all be legal ;D j/k

BTW I looked @ your forum & it didn't show the names, just the karma, its this because I wasn't logged in?

Advertisement: