The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

When members log in, immediately re-direct to main thread?

5 posters

Go down

Solved When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 4th 2012, 4:37 am

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
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Zerotheheroe March 4th 2012, 11:47 pm

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 -/
Zerotheheroe
Zerotheheroe
Forumember

Posts : 333
Reputation : 8
Language : English

http://www.clancaos.net

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 5th 2012, 2:40 am

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. :/
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 5th 2012, 4:06 am

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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 6th 2012, 4:17 am

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.
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 6th 2012, 8:19 pm

Don't use the one above. It will redirect anybody, not just new members.

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);
}
Make sure you change 'YOUR THREAD URL' for the url of thread you want them sent to.

*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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 7th 2012, 12:04 am

LGforum wrote:Don't use the one above. It will redirect anybody, not just new members.

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);
}
Make sure you change 'YOUR THREAD URL' for the url of thread you want them sent to.

*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!
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 7th 2012, 2:17 am

You leave the quotes in.

And the tick boxes is up to you... tick wherever you want the code to be activated..
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 7th 2012, 6:05 am

ya that code didnt work. :/
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 7th 2012, 1:18 pm

The code works fine. Paste the exact code you used here.Or better yet your forum URL.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 10th 2012, 1:04 am

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
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 10th 2012, 10:26 pm

bump...
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 11th 2012, 2:46 am

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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 11th 2012, 2:49 am

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... :/
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by sfghhjkyu March 11th 2012, 3:38 am

Content Removed ~ Member Banned.



avatar
sfghhjkyu
New Member

Posts : 4
Reputation : 1
Language : dfjk

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 11th 2012, 11:13 pm

Bump!
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 12th 2012, 3:10 am

Have you got rid of or edited the default navbar at all?
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 12th 2012, 10:37 pm

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
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 13th 2012, 11:03 pm

bump...
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 13th 2012, 11:15 pm

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.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 13th 2012, 11:17 pm

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/
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 13th 2012, 11:24 pm

You seem to have a JS file wth this in:
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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 14th 2012, 4:24 am

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);
}
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 15th 2012, 6:38 am

bumpp
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 15th 2012, 11:18 am

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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 15th 2012, 9:23 pm

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!Very Happy
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by LGforum March 16th 2012, 12:40 am

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.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by Mr. Eddster March 16th 2012, 12:44 am

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.Smile
Mr. Eddster
Mr. Eddster
Forumember

Male Posts : 382
Reputation : 7
Language : English

http://sports-forumbuzz.canadian-forum.com/

Back to top Go down

Solved Re: When members log in, immediately re-direct to main thread?

Post by kirk March 16th 2012, 1:46 am

Topic Solved & Locked
kirk
kirk
Forumaster

Male Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum