Redirection
Page 1 of 1 • Share
It will only direct them if they're not logged into the forum, which would make them guests. You can put this in a variety of places..
IF you don't want them to be able to view the forum at all, put it in Overall_header
If you don't want them to view topics put it in Viewtopic_body
IF you don't want them to be able to view the forum at all, put it in Overall_header
If you don't want them to view topics put it in Viewtopic_body
- LGforumModerator
- Forum Posts : 77
Member Since : 2011-11-12
Don't put it in the overall header, as then when he is on the register page or log in page, yes he'll still get redirected.
The better way would be a javascript route. Something like this in an announcement:
It will also provide you with a global variable stating if the user if logged in or not for use in other Javascripts
The better way would be a javascript route. Something like this in an announcement:
- Code:
<script>
var is_logged_in=('{USERNAME}'!='Guest');
(function(){
var p = window.location.pathname.substr(1);
if(p.length && p != 'login' && p != 'register' && !is_logged_in) {
window.location = '/redirect page';
}
})();
</script>
It will also provide you with a global variable stating if the user if logged in or not for use in other Javascripts
- Sponsored content
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|