Last edited by Mr. Eddster on March 15th 2012, 9:31 pm; edited 1 time in total
5 posters
When members log in, immediately re-direct to main thread?
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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 March 15th 2012, 9:31 pm; edited 1 time in total
Zerotheheroe- Forumember
- Posts : 333
Reputation : 8
Language : English
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 -/
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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!
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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..
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
ya that code didnt work.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
The code works fine. Paste the exact code you used here.Or better yet your forum URL.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
bump...
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Your thread URL needs to be on the same line as the equals sign. You seemed to have put it on the next line.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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...
sfghhjkyu- New Member
- Posts : 4
Reputation : 1
Language : dfjk
Content Removed ~ Member Banned. |
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
Bump!
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Have you got rid of or edited the default navbar at all?
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
bump...
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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/
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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);
}
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
bumpp
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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)}
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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!
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
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.
Mr. Eddster- Forumember
- Posts : 382
Reputation : 7
Language : English
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.
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Topic Solved & Locked |