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
Heh, nice one. I have to try this :)
Indeed, a nice and clever tip Tau Online
Very nice, i think i will use it on my board, thx again!
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 :)
Im gonna use this all the time, this is great, and plus gets them everytime.
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 :)
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
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.
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. :)
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 :)
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.)
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?
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.?
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..
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?
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.
tau, can you make a mod/package for this? would be awesome
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!
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?
Quote from: rickc on December 15, 2004, 08:40:17 PM
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?
Your welcome :) Also the thing about the karma: I didn't know that'd happen! I'll fix it when I can :)
Blast from the past..... I know it's an old thread but this is a great code. I know no one reads my user agreement so I've just installed this. I'm using v1.0.5 and I needed to change the following:
<a href="'.dirname().'index.php?action=register">
to
<a href="/index.php?action=register">
If your board isn't installed in the root directory you need to account for that too (ie. add the path after the /).
Sorry for kicking up this old topic but I like to implement this mod in my "SMF 1.1 RC 2" forum.
I adjusted the file "register.template.php". No problem there.
Now I want to adjust the file "register.php" and I'm looking for the line // No name?! How can you register with no name? but that line isn't there.
Where to put the code I have to add there?
No problem, try searching for the following instead:
Quote// Collect all extra registration fields someone might have filled in.
Thanks,
Tau Online
Great it works :D
Thank you very much Tau Online !!
I tested the mod and it works fine. Also the link to return to the registration-page works fine.
Just a little problem occured. My error logs shows this when the mod has done it's work.
2: Wrong parameter count for dirname()
Bestand: /home/....../public_html/forum/Sources/Register.php
Regel: 154
Problem solved :)
This line in register.php created my problem :
Klik <a href="'.dirname().'index.php?action=register">hier</a> om opnieuw te registreren.',false);
I replaced it by this:
Klik <a href="http://www.pcnavigator.nl/forum/index.php?action=register">hier</a> om opnieuw te registreren.',false);
Quote from: Han on February 05, 2006, 01:13:53 PM
Problem solvedĀ :)
This line in register.php created my problem :
Klik <a href="'.dirname().'index.php?action=register">hier</a> om opnieuw te registreren.',false);
.dirname should be $scripturl
Klik <a href="', $scripturl, '?action=register">hier</a> om opnieuw te registreren.',false);
Okee ;)
Ah thanks - I've never been 100% sure what variable to use. I've updated the first post to use $scripturl instead.
// Collect all extra registration fields someone might have filled in.
I cannot find this line in Register.php inside the sources directory, am I missing something obvious?
Thanks,
Nick
Okay I've updated my first post so this will work with SMF 1.0.
what a waste of tme reading registration agreement nothing but blah blah as if reading it will force you to follow the rules ha ha
does this mod work with smf 1.1 r2 :P
people it now works but the link to go back to register doesn't work for me
i copied the register.php to the theme i use but that link doesn't work
'.$scripturl.'index.php?action=register this seems to be the link url is that right? :P
I really like the idea of 'forcing' new members to read the registration agreement, so I thought I'd give your tip/trick a go ... but now I've managed to screw up my registration process.
I'm fairly certain that I edited everything correctly, uploaded them to the proper places, etc., but when I did a test registration, I received the following error:
An Error Has Occurred!
You are not allowed to access this section
Any help would be greatly appreciated. (I'm using version 1.0.7.) Thank you.
-LuckyOne
Are you sure you followed the correct part - i.e. you searched for "// Trim any whitespace from the username." and not "// Collect all extra registration fields someone might have filled in."?
Sorry although I'm off on holiday in a matter of hours and so will be little help at the moment :-[
I can't really see where this would change things so that the registration cycle is broken.. I know this is old however I can remember testing it on 1.0(.4?) and it worked alright.
Actually, could you try changing the following:
In /Sources/Register.php
Find:
<br /><br />Please click <a href="', $scripturl, 'index.php?action=register">here</a> to re-register.',false);
Replace with:
<br /><br />Please click <a href="', $scripturl, '?action=register">here</a> to re-register.',false);
I think I messed the link back URL - it shouldn't have included the "index.php". If that doesn't work, I'd suggest just uninstalling this until I come back and can look into this further (I'll be back Saturday).
Quote from: Tau Online on July 11, 2006, 05:22:12 AM
Actually, could you try changing the following:
In /Sources/Register.php
Find:
<br /><br />Please click <a href="', $scripturl, 'index.php?action=register">here</a> to re-register.',false);
Replace with:
<br /><br />Please click <a href="', $scripturl, '?action=register">here</a> to re-register.',false);
I think I messed the link back URL - it shouldn't have included the "index.php". If that doesn't work, I'd suggest just uninstalling this until I come back and can look into this further (I'll be back Saturday).
Thank you for the response!
Well, I did what you said and now we're a bit closer to the end result. This time I get the following error:
An Error Has Occurred!
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.
Please click <a href="
-LuckyOne
Does this work for version 1.1 RC2?
WOW!
Great, working also! :P :P
Quote from: LuckyOne on July 11, 2006, 05:44:40 AM
Quote from: Tau Online on July 11, 2006, 05:22:12 AM
Actually, could you try changing the following:
In /Sources/Register.php
Find:
<br /><br />Please click <a href="', $scripturl, 'index.php?action=register">here</a> to re-register.',false);
Replace with:
<br /><br />Please click <a href="', $scripturl, '?action=register">here</a> to re-register.',false);
I think I messed the link back URL - it shouldn't have included the "index.php". If that doesn't work, I'd suggest just uninstalling this until I come back and can look into this further (I'll be back Saturday).
Thank you for the response!
Well, I did what you said and now we're a bit closer to the end result. This time I get the following error:
An Error Has Occurred!
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.
Please click <a href="
-LuckyOne
I wonder why I'm the only one who can't get it to work. I'm fairly certain that I did everything correct. Has anyone else had success with 1.0.7?
Thanks.
-LuckyOne
Quote from: LuckyOne on July 15, 2006, 04:00:37 PM
I wonder why I'm the only one who can't get it to work. I'm fairly certain that I did everything correct. Has anyone else had success with 1.0.7?
Thanks.
-LuckyOne
In response to the error you received earlier.. how long did you wait until you pressed register? If you waited under the default 20 seconds you would receive the error?
Quote from: Tau Online on July 16, 2006, 05:48:48 AM
In response to the error you received earlier.. how long did you wait until you pressed register? If you waited under the default 20 seconds you would receive the error?
Yes. Under 20 seconds gives me the above code with the broken <a href=" link. So, I think it almost works ... just not quite.
If I wait more than 20 seconds, I can register normally.
-LuckyOne
Ah okay, it looks to just be a syntax thing then which is better news than it could be :) Could you post a link to your forums/the coding that is produced so I can check out what needs changing? I can't see what would cause the error in the most recent change I posted up.
Thanks,
Tau Online
Does this work for 1.1 RC2?
Quote from: SurfExcelerator.com on July 20, 2006, 08:36:25 AM
Does this work for 1.1 RC2?
As far as I know it does :) Sorry for not replying to your earlier question, I lost this thread.
Tau Online
<br /><br />Please click <a href="' ,$scripturl, '?action=register">here</a> to re-register.',false);
Replace with
<br /><br />Please click <a href="' .$scripturl. '?action=register">here</a> to re-register.',false);
Those two pretty much do the same thing - or at least they echo the same thing, don't they?
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.
I Agree 100%. Besides, even if you do not actually agree, you 'have' to in order to register.
The only thing is, if I saw that message I'd just leave and not sign up. Signing up should be a quick and easy process, the harder it is the less people who'll waste time doing it.
If -I- saw that message, I'd be like...."Whoa. Must be something worth reading..." and then I'd read it.
The point is, sometimes the agreement has IMPORTANT INFORMATION in it. And when people just blaze through it, and they agree, then whine and cry later because they didn't remember seeing something that was specifically mentioned, it gets to be bothersome.
Hell, by everyone's complaining logic, why have anyone register for anything at all? Why not take off your registrations off of your forums and just let everyone post and do what they want to? That way, you don't even have to take the few seconds to register, you can just kick in and start posting!
What a great idea!
*scowls* I mean...it's a REGISTRATION agreement. 20 seconds is like...nothing. You can waste 20 seconds checking your e-mail really quick if you can't be bothered to read it.
Bah. Whatever. I think it's a good idea, and I think I might even use the script, if I can think of something to put in my own registration agreement.
With thanks to Tau's permission I have packaged this.
Mod Page (http://mods.simplemachines.org/index.php?mod=414)
Can you include where is the file's path?
Quote from: perlisbetter on August 06, 2006, 12:55:01 PM
The only thing is, if I saw that message I'd just leave and not sign up. Signing up should be a quick and easy process, the harder it is the less people who'll waste time doing it.
Attitudes like that are from people I
don't want on my forum; the kind that don't read rules, then spam the staff with hundreds of questions and get mad as soon as they're banned. This mod is fantastic.
It didn't work!
Even I make it 200 seconds..
if( ( time() - $_POST['time'] ) < 200 )
and I regestered my own forum 40 seconds. But nothings change! There is no warn!
I registered anyway..
Up!
Helloooo, Is any body up there? (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.istanblues.org%2Fforum%2FSmileys%2Fistanblues.org%2Fjuggle.gif&hash=6d240e5fd9c8e80eb66b10ed5d3822eb5fb1c8ec)
Sorry for not replying, although this is really an old tip/trick and I lost track of this thread.
Hmm... I haven't tried this out, although are you sure that:
<input type="hidden" name="time" value="'. time() . '" />
Was added? I can't see why this wouldn't work if not.
I mean, as long as the above is added to the Register.template.php regisration form, and then:
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);
}
Is added to the relevant place in /Sources/Register.php, it should work without any problem?
Thank you very much @Tristan Perry it works great..
But this link creates error <a href="', $scripturl, '?action=register">..
But doasn't matter. I find a way..
Now maybe I'm just being a bit silly, can find (and edited) the register.php template, but can't find the register.template.php anywhere?
Any clues please?
This is great! Thank you.. this saved my a lot of mails... :D
say i realize that this post is really really old but i was wondering if it could still be used in 2.0rc3
thanks
Has anyone ever tried this for the 2.0 version of make?
Good...nice tip...helped me a lot...hope you share more information like this with us...
:) :) :)