Page 1 of 2

Wait At Registration

Posted: Tue Dec 22, 2009 4:52 pm
by Extensions Robot
Modification name: Wait At Registration
Author: Marc
Modification description: This mod will set a timing in the Agreement page so the user reads the Terms.
Modification version: 1.0.1
Tested on phpBB version: 3.0.6

Download file: Wait_At_Registration_1.0.1.zip
File size: 132.04 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extensions Team may not be able to provide support.

-->Modification support<--

Wait At Registration

Posted: Tue Dec 22, 2009 4:52 pm
by DavidIQ
Modification validated/released

Notes:

Wait At Registration

Posted: Tue Dec 22, 2009 4:52 pm
by Marc
This MOD is the further development of Xtracker!'s MOD Wait At Registration 0.0.4, which I have taken over from him.

Support can be found on http://www.m-a-styles.de

Demo: http://www.m-a-styles.de/ucp.php?mode=register

Changes 1.0.0 to 1.0.1:
  • Reworked script with JQuery
  • Added fix for Internet Explorer

Re: Wait At Registration

Posted: Tue Dec 22, 2009 4:56 pm
by alhitary
nice mod with nice idea
a photo plz or demo

Re: Wait At Registration

Posted: Wed Dec 23, 2009 7:06 am
by gerschel
As a note to other installers. FTP to your site and copy countdown.html from ./styles/subsilver2/template into the template folder of the theme you are going to use (after install), otherwise there will be an error when you click register saying that this file is missing.

This is an awesome mod. Since I have added to my terms of use, I was worried if people will actually read it. Now I can guarantee that they will stay for a short time (not enough to make a conflict of attention span), whether they read it or not, but it emphasizes it's importance.

Side note idea off-but_close_enough-topic: A fun quiz to make sure they read and understood the terms of use? (blast away the things you can't do, save the ones that you can do, use labels on t-shirts of the game for customization? memory? etc.)

Re: Wait At Registration

Posted: Wed Dec 23, 2009 7:14 am
by Peter77sx
Aww chucks, not compatible with IE.. bummer.

Re: Wait At Registration

Posted: Wed Dec 23, 2009 8:22 am
by PinoyEngineâ„¢
Any possibility there would be an IE fix update?

Re: Wait At Registration

Posted: Wed Dec 23, 2009 1:18 pm
by Ahri89
I have installed No-Script and this mod not work.

Can we bind activate script to continue?

Thanks. :)

Re: Wait At Registration

Posted: Wed Dec 23, 2009 8:18 pm
by Marc
If you are talking about the Firefox Plug-In then you'll probably just have to allow it for the website.

@all: I didn't know that it doesn't work with IE and I'll try to fix this asap.

Re: Wait At Registration

Posted: Fri Dec 25, 2009 8:50 am
by Marc
Internet Explorer Fix (tested with IE 8)

prosilver-based styles:

Open styles/prosilver/ucp_agreement.html
Find:

Code: Select all

<input type="submit" name="agreed" id="agreed" value="{L_AGREE}" class="button1" />
Replace with:

Code: Select all

<input type="submit" name="agreed" id="agreed" value="{L_AGREE}" class="button1" style="display: none;" />
Find (it's right behind the last edit):

Code: Select all

&nbsp;
Replace with:

Code: Select all

			<!-- IF COUNTDOWN_INTERVAL -->
				<!-- INCLUDE countdown.html -->
			<!-- ENDIF -->
			&nbsp;
Find:

Code: Select all

			<!-- IF COUNTDOWN_INTERVAL -->
				<!-- INCLUDE countdown.html -->
			<!-- ENDIF -->
Delete it.

Open styles/prosilver/template/countdown.html
Replace everything with this:

Code: Select all

<input type="button" name="fake_agreed" id="fake_agreed" value="{L_AGREE}" class="button1" />
<script type="text/javascript"> 
// <![CDATA[
/* 
* @author Juan Fernandez (http://www.exckor.com)
* @author Marc Alexander (http://www.m-a-styles.de)
*
* @package Wait At Registration
* @version $Id: countdown.html 1.0.0
* @copyright (c) 2009 Juan Fernandez, Marc Alexander
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/
var countDownInterval = {COUNTDOWN_INTERVAL} + 1;
var divname = 'agreed'; // do not change this
var div_backup = document.getElementById('fake_' + divname).value;
function countDown() 
{
	div = document.getElementById(divname);
	fake_div = document.getElementById('fake_' + divname);
	countDownInterval--;
	if (countDownInterval == 0) {
		div.style.display = '';
		fake_div.style.display = 'none';
		div.value = div_backup;
	} else {
		fake_div.value = div_backup + ' [' + countDownInterval + ']';
		setTimeout(countDown, 1000);
	}
}

window.onload = countDown();
// ]]>
</script>
subsilver2-based styles:

Open styles/subsilver2/ucp_agreement.html
Find:

Code: Select all

<input class="btnlite" type="submit" id="agreed" name="agreed" value="{L_AGREE}" />
Replace with:

Code: Select all

<input class="btnlite" type="submit" id="agreed" name="agreed" value="{L_AGREE}" style="display: none;" />
Inline-Find (it's right behind the last edit):

Code: Select all

<br /><br />
Replace with:

Code: Select all

							<!-- IF COUNTDOWN_INTERVAL -->
								<!-- INCLUDE countdown.html -->
							<!-- ENDIF -->
							<br /><br />;
Find:

Code: Select all

							<!-- IF COUNTDOWN_INTERVAL -->
								<!-- INCLUDE countdown.html -->
							<!-- ENDIF -->
Delete it.

Open styles/subsilver2/template/countdown.html
Replace everything with this:

Code: Select all

<input class="btnlite" type="button" id="fake_agreed" name="fake_agreed" value="{L_AGREE}" />
<script type="text/javascript"> 
// <![CDATA[
/* 
* @author Juan Fernandez (http://www.exckor.com)
* @author Marc Alexander (http://www.m-a-styles.de)
*
* @package Wait At Registration
* @version $Id: countdown.html 1.0.0
* @copyright (c) 2009 Juan Fernandez, Marc Alexander
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/
var countDownInterval = {COUNTDOWN_INTERVAL} + 1;
var divname = 'agreed'; // do not change this
var div_backup = document.getElementById('fake_' + divname).value;
function countDown() 
{
	div = document.getElementById(divname);
	fake_div = document.getElementById('fake_' + divname);
	countDownInterval--;
	if (countDownInterval == 0) {
		div.style.display = '';
		fake_div.style.display = 'none';
		div.value = div_backup;
	} else {
		fake_div.value = div_backup + ' [' + countDownInterval + ']';
		setTimeout(countDown, 1000);
	}
}

window.onload = countDown();
// ]]>
</script>

Re: Wait At Registration

Posted: Sat Dec 26, 2009 2:28 am
by Xtracker!
Congrats on validation :)

Re: Wait At Registration

Posted: Sat Dec 26, 2009 3:33 am
by doum-ti-di-li-doom
Only looked at the demo, 2 comments

a) needs unobtrusive javascript // progressive enhancement
b) don't blindly hijack window.onload

Re: Wait At Registration

Posted: Sat Dec 26, 2009 12:08 pm
by Marc
@doum-ti-di-li-doom:
a) This was only the first release and there will be a few improvements in the next version, i.e. I'm currently taking a look at JQuery.

b) How am I blindly hijacking window.onload? I know that I could overwrite an already existing window.onload function, but do you see any window.onload events on the register page? I don't.
Still, I intend to make this little script a bit more professional with JQuery and I think that will also get rid of the hijacking. ;)

@Xtracker: Thank you and also thanks for the idea and the first few releases. :)

Re: Wait At Registration

Posted: Thu Dec 31, 2009 6:03 am
by sevenalive
good mod, but imo it's useless because 99% of the users will be annoyed and still won't read it, i know i don't lol.

Re: Wait At Registration

Posted: Mon Jan 11, 2010 2:13 pm
by Bartelli
Maybe a stupid question, but where can I set the time for this countdown? I have an important agreement which I really want to have read by the people who want to join. This is a great mod for me.