The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to manage a visitor redirect?
First the goal: I am trying to redirect a visitor to my registration page after they have been browsing my site for some time.
Here id the code that sort of works: HTML Code:
<vb:if condition="$bbuserinfo['userid'] == 0"> <meta HTTP-EQUIV="REFRESH" content="30; url=http://mysite.com/register.php"> </vb:if> It looked like it does exactly what I expected, at first. I then noticed that when I was in the registration form that it refreshed because that same code is in its header as well. How can I get either to not put the refresh code in the registration form or add a conditional that detects that its in the form and does not do the refresh? I was thinking in the original code to add some like "If This Page = register" or whatever the correct variable term is for check the page. Any help will be greatly appreciated. Thanks Michael |
#2
|
|||
|
|||
According to the file register.php in your forum root directory this is line 17:
PHP Code:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Thanks for the update. I was thinking that I needed a added condition in the template conditional. I am not using any php code to do this redirect as the whole process is contained and executed inside the headinclude template. So, I was thinking that I needed something like :
HTML Code:
<vb:if condition="$bbuserinfo['userid'] == 0" AND !(THIS_SCRIPT == 'register')>
Any ideas? Edit: Found it! HTML Code:
<vb:if condition="$bbuserinfo['userid'] == 0" AND condition="THIS_SCRIPT != 'register'"> <meta HTTP-EQUIV="REFRESH" content="15; url=http://yoursite.com/register.php"> </vb:if> bpr: thanks for the tips, got me thinking in the right direction |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|