![]() |
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"> 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 |
According to the file register.php in your forum root directory this is line 17:
PHP Code:
PHP Code:
PHP Code:
|
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'"> bpr: thanks for the tips, got me thinking in the right direction |
All times are GMT. The time now is 07:04 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|