When members log in, immediately re-direct to main thread?
5 posters
Page 1 of 1
When members log in, immediately re-direct to main thread?
Hi I was wondering if there was a way for when new users log in, they immediately go to our main thread? This would be extremely helpful...
Last edited by Mr. Eddster on Thu 15 Mar 2012, 20:31; edited 1 time in total
Re: When members log in, immediately re-direct to main thread?
I don't think that's possible, but you could possibly set a redirection HTML page as your forum's main index - so when they sign in, it would take them to the topic!
You could put something such as, "You're being taken to "" topic, please wait"
You could even use this code if you wish!
/- Begin Code -\
<center>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">
<br>
<br>
<b> You're being redirected to "" topic, please wait. </b></center>
\- End Code -/
You could put something such as, "You're being taken to "" topic, please wait"
You could even use this code if you wish!
/- Begin Code -\
<center>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">
<br>
<br>
<b> You're being redirected to "" topic, please wait. </b></center>
\- End Code -/
Re: When members log in, immediately re-direct to main thread?
Again, I made a new HTML page, and it did re-direct to the right place, but when i logged in as a new user, it didnt re-direct me to the place I wanted it to go to.
Re: When members log in, immediately re-direct to main thread?
It's possible to check if a user is logging in for the first time and redirect them to a thread. It would be done by redirecting them and setting a cookie so they aren't redirected in the future.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:It's possible to check if a user is logging in for the first time and redirect them to a thread. It would be done by redirecting them and setting a cookie so they aren't redirected in the future.
See what I want to do is whenever someone signs in I want to re-direct them to our main thread. The re-direction code he gave me worked, but it doesn't when you log in.
Re: When members log in, immediately re-direct to main thread?
Don't use the one above. It will redirect anybody, not just new members.
Just put this in a new javascript.
*Please notes, this wil redirect your current members once too. However members will not be redirected ever again after they have been redirected once.
Just put this in a new javascript.
- Code:
if(my_getcookie('thread_redirect')!=0 && document.getElementById('logout')) {
window.location = 'YOUR THREAD URL';
my_setcookie('thread_redirect',1,1);
}
*Please notes, this wil redirect your current members once too. However members will not be redirected ever again after they have been redirected once.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:Don't use the one above. It will redirect anybody, not just new members.
Just put this in a new javascript.Make sure you change 'YOUR THREAD URL' for the url of thread you want them sent to.
- Code:
if(my_getcookie('thread_redirect')!=0 && document.getElementById('logout')) {
window.location = 'YOUR THREAD URL';
my_setcookie('thread_redirect',1,1);
}
*Please notes, this wil redirect your current members once too. However members will not be redirected ever again after they have been redirected once.
Ok SO I turned Javascript codes on, and went to the "Javascript codes management" and theres 6 checkboxes for the palcement: "homepage", "portal" "sub-forums", "In the Topics", "in the gallery", and "in all the pages", which ones do I check?
And one other question: do I take out the little single quotation marks that I bolded in your quote, or do I leave them in? Thanks!
Re: When members log in, immediately re-direct to main thread?
You leave the quotes in.
And the tick boxes is up to you... tick wherever you want the code to be activated..
And the tick boxes is up to you... tick wherever you want the code to be activated..
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
The code works fine. Paste the exact code you used here.Or better yet your forum URL.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:The code works fine. Paste the exact code you used here.Or better yet your forum URL.
This is how I put it in:
if(my_getcookie('thread_redirect')!=0 && document.getElementById('logout')) {
window.location = 'http://hankthetank.canadian-forum.com/t288-must-read-for-all-new-posters';
my_setcookie('thread_redirect',1,1);
}
I made a new account, and logged in and it didnt go to that page...
I've got javascript enabled, and WYSIWYG disabled. And i put it in all pages.
Re: When members log in, immediately re-direct to main thread?
Your thread URL needs to be on the same line as the equals sign. You seemed to have put it on the next line.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:Your thread URL needs to be on the same line as the equals sign. You seemed to have put it on the next line.
Nope, its on the same line...
Re: When members log in, immediately re-direct to main thread?
Content Removed ~ Member Banned. |
sfghhjkyu- New Member
- Posts : 4
Reputation : 1
Language : dfjk
Re: When members log in, immediately re-direct to main thread?
Have you got rid of or edited the default navbar at all?
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:Have you got rid of or edited the default navbar at all?
Huh? I have no custom navbars, just the site default ones.
Re: When members log in, immediately re-direct to main thread?
Can you link me to your forum then, there may be other scripts hitting errors preventing it working.
Also, it sets a cookie so it doesn't redirect people more than once... So if you've been redirected, then it wil appear not working for you anymore.
Also, it sets a cookie so it doesn't redirect people more than once... So if you've been redirected, then it wil appear not working for you anymore.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:Can you link me to your forum then, there may be other scripts hitting errors preventing it working.
Also, it sets a cookie so it doesn't redirect people more than once... So if you've been redirected, then it wil appear not working for you anymore.
http://hankthetank.canadian-forum.com/
Re: When members log in, immediately re-direct to main thread?
You seem to have a JS file wth this in:
Thats not JS, and hence causing an error.
- Code:
<center><meta HTTP-EQUIV="REFRESH"content="0;url='http://hankthetank.canadian-forum.com/t288-must-read-for-all-new-posters'><br><br><b>You're being redirected to"All New Users must Read"topic,please wait.</b></center>
Thats not JS, and hence causing an error.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
Grr I edited the code, put this in, and it still doesn't re-direct!
if(my_getcookie('thread_redirect')!=0 && document.getElementById('logout')) {
window.location = 'http://hankthetank.canadian-forum.com/f5-must-read-for-all-new-posters';
my_setcookie('thread_redirect',1,1);
}
if(my_getcookie('thread_redirect')!=0 && document.getElementById('logout')) {
window.location = 'http://hankthetank.canadian-forum.com/f5-must-read-for-all-new-posters';
my_setcookie('thread_redirect',1,1);
}
Re: When members log in, immediately re-direct to main thread?
try this:
- Code:
if(my_getcookie('thread_redirect')!='done'&&!document.getElementById('i_icon_mini_register')){
window.location='http://hankthetank.canadian-forum.com/f5-must-read-for-all-new-posters';
my_setcookie('thread_redirect','done',1)}
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:try this:
- Code:
if(my_getcookie('thread_redirect')!='done'&&!document.getElementById('i_icon_mini_register')){
window.location='http://hankthetank.canadian-forum.com/f5-must-read-for-all-new-posters';
my_setcookie('thread_redirect','done',1)}
Alright so once I went back to the main screen from my admin panel, it re-directed me there, but then I made a new account and it didnt redirect me there! I will ask the other members if it re-directed them to that page when they logged in!
Edit: this has worked for 2 users! Thank youvery much for finally solving this!
Re: When members log in, immediately re-direct to main thread?
It didn't redirect you the second time, because it has saved a cookie, the cookie is saved on your computer, and is not specific to the user that you sign in on. SO even if you sign in as someone else the cookie is set, hence not redirecting you.
Glad its finally sorted, I wonder what was up with the first script.
Glad its finally sorted, I wonder what was up with the first script.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: When members log in, immediately re-direct to main thread?
LGforum wrote:It didn't redirect you the second time, because it has saved a cookie, the cookie is saved on your computer, and is not specific to the user that you sign in on. SO even if you sign in as someone else the cookie is set, hence not redirecting you.
Glad its finally sorted, I wonder what was up with the first script.
Yup it works perfectly now! Thank you.
Re: When members log in, immediately re-direct to main thread?
Topic Solved & Locked |
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Similar topics
» Many pages, of one Thread, have immediately vanished, after posting a new comment
» My forum thread was locked, new thread created, w/o my permission???
» How to enable the edit post on members thread
» The direct link to the last post
» Changes To Javascript Almost Immediately Reset...
» My forum thread was locked, new thread created, w/o my permission???
» How to enable the edit post on members thread
» The direct link to the last post
» Changes To Javascript Almost Immediately Reset...
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum