4images Forum & Community

4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: Flo2005 on October 03, 2006, 09:48:45 AM

Title: 10 seconds inactive agree button when register
Post by: Flo2005 on October 03, 2006, 09:48:45 AM
This little script keeps the agree button (in register_signup.html) inactive until 10 seconds. So users have some time to read the agreements 8)

Example:
(http://www.snuup.de/4img_gfx/count_agree_button.jpg)

Files to modify:

templates/default/register_signup.html
templates/default/register.html

1. edit register_signup.html and find:

Code: [Select]
<form method="post" action="{url_register}">
<input type="hidden" name="action" value="register" />
<input type="submit" value="{lang_agree}" class="button" />
</form>

replace with:

Code: [Select]
<form method="post" action="{url_register}" name="sform">
<input type="hidden" name="action" value="register" />
<input type="hidden" name="disclaimer" value="viewed">
<input type="submit" name="submitbtn" value="{lang_agree}" class="button" />
</form>

2. open register.html and find: {footer}

Add above

Code: [Select]
<script language="javascript">
<!--
var secs = 10;
var wait = secs * 1000;
document.sform.submitbtn.disabled=true;

for(i=1;i<=secs;i++) {
 window.setTimeout("update(" + i + ")", i * 1000);
}

window.setTimeout("timer()", wait);

function update(num) {
 if(num == (wait/1000)) {
  document.sform.submitbtn.value = "Akzeptieren";
 }
 else {
  printnr = (wait/1000)-num;
  document.sform.submitbtn.value = "Akzeptieren (" + printnr + ")";
 }
}

function timer() {
 document.sform.submitbtn.disabled=false;
}
//-->
</script>

I really donīt know if itīs the best place to embed this script here above the footer, but it works - try it yourself  :wink:

Best regards by Flo
Title: Re: 10 seconds inactive agree button when register
Post by: JensF on January 21, 2007, 05:48:52 PM
Great, thanks for this....works fine....
Title: Re: 10 seconds inactive agree button when register
Post by: manurom on January 22, 2007, 01:39:17 AM
Well, I'm an usual Internet user.
I am already bored with welcome pages displaying flash animations and quickly click on "pass the intro", as soon as I can.
What is the real use of this modification? I believe that if I go to your website and submit, and then see that nothing happens, I close my browser's page and go to another website. It is just a "typical Internet user" behaviour, I think. Maybe I am wrong. Howether, I let you explain where you are wright and where I am wrong, as webmasters' job is to attract visitors in the five first seconds they once visit the site.
Sorry for the post, but don't think your visitors are only (http://iranpoliticsclub.net/club/images/smiles/-%20donkey.gif) donkeys.
There already exists people having lowband connexion and screens displaying images 800X600 pixels, even if we are in the 21th century world ( I see it every day), who may not bear your conditions.
Title: Re: 10 seconds inactive agree button when register
Post by: CeJay on January 22, 2007, 01:45:39 AM
This would make sense if you want to force your users to at leats start reading the agreement.
However since you have control over what they upload and can delete their account if needed.
So this can be useful and can be un needed. Depends on how you look at it.

Still a neat idea to force people to read a little, but should modify the template and say the button will active after so many seconds.