• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Redirect after clicking on confirmation mail link

#1
Hi there!

I've been searching all day but I can't seem to find a way to automatically redirect (if possible after 3 seconds or so) a user to my blog site at www.site.com instead of just waiting for the user to click something.

I've hear it has to do something with:
Admin CP -> Appearance -> Templates -> register_confirm
or
Admin CP -> Appearance -> Templates ->register_process


Example:
-New user registers, and a message of a confirmation email has been sent
-New user goes to email account and clicks link
-A page with "Your account has been confirmed"
(3 seconds after)
(redirects to www.site.com)

My forum url is: www.site.com/forum
My blos ulr is: www.site.com

I would really appreciate your help with this, it might be an easy one but I just can't understand xenforo hooks.
 

Jake Bunce

XenForo moderator
Staff member
#2
Add this code to either template (or both):

Code:
<script type="text/javascript">
	$(document).ready(function(){
		setTimeout(function(){
			window.location = 'http://www.apple.com/';
		}, 3000);
	});
</script>
This is javascript to redirect the user after 3 seconds. Just put your URL in there.
 
#4
Add this code to either template (or both):

Code:
<script type="text/javascript">
    $(document).ready(function(){
        setTimeout(function(){
            window.location = 'http://www.apple.com/';
        }, 3000);
    });
</script>
This is javascript to redirect the user after 3 seconds. Just put your URL in there.
BTW
Is it possible to do it in a new tab instead of reloadint the same page?
 

Jake Bunce

XenForo moderator
Staff member
#5
BTW
Is it possible to do it in a new tab instead of reloadint the same page?
Code:
<script type="text/javascript">
	$(document).ready(function(){
		setTimeout(function(){
			window.open('http://www.apple.com/','_blank');
		}, 3000);
	});
</script>
You will find that most browsers block this by default.