There's been a few creators asking for a redirect script without having to pay someone to write it for them so hear you guys go

This is perfect for a splash page Like the one I created for Cross Roads Fellowship.

Cross Roads Fellowship splash page http://wellkunnected.com/page/gift-56

It will work sending it to your sign in page as well. I've tested it with a splash page & sign in/sign up page.

this script will redirect any Non-logged in members to any page you would like.  Just remember you Need to use a third-party hosting site not your own network for a splash page!!! right now I'm temporarily using my friends network "Well Kunnected" for the splash page.

Just replace the url "http://wellkunnected.com/page/gift-56" to wherever you've created your splash page or your sign in page.

Then add the code to your NC custom code box it could take up to 1 to 10 minutes for the script to take effect because of your network catch. But once it does it takes one or two seconds or so to redirect your network to the splash page/sign in page.

Redirect script

<script type="text/javascript">
if(ning.CurrentProfile == null){
    location.href = "http://wellkunnected.com/page/gift-56";
}
</script>

 

timed redirect

And if you would like a timed redirect use this code. The 9000 at the end of the code is the same as 9 seconds so if you want a 30 second delay change the 9000 to 30000

1000 = one second

<script type="text/JavaScript">
if(ning.CurrentProfile == null){
setTimeout("location.href = 'http://wellkunnected.com/page/gift-56';",9000);
}
</script>

delayed pop-up

you can combine the script above with a timed non-logged in members pop up about page just set the pop up page time to a couple seconds less than the redirect script

Or if you'd rather have your non-logged-in members just have a timed pop up to the sign in or sign-up page use this code.

Just change the url to the one you preferre (Sign in page or sign-up page  or even an about page) and your delay time is at the very bottom it's set to one second right now

<script type="text/JavaScript">

if(ning.CurrentProfile == null){
  SW=window.open('http://4himalone.ning.com/main/authorization/signIn','NewWin','toolbar=no,status=no,width=750,height=635')  

  SW.moveTo(190,240);  
}

</script>

</head>

<body onLoad="setTimeout('openPopup()', 1000);">

I'm using the Timed redirect script on crossroad fellowship it's a nine second delay check it out here http://4himalone.ning.com/

Tags: in, network, page, redirect, script, sign, splash, up

Views: 2030

Reply to This

Replies to This Discussion

 you're so very welcome Jim :-) God bless

Hello, my site worked this code on every page and redirect directly to the login page, but how do I assign a few seconds for this script into action?

For example, I would leave members free for about 30 seconds and after that the script takes them to the desired page.

Its doing this?

Thanks and it was a great job!

That jiggling menu sure is, er, unique. Gave me a headache :-)

Try that:

setTimeout(function(){location.href = "your sign-in page"},30000);

Number argument is in miliseconds.

Excuse my stupidity, but where in the code do I put this?

got it!! Thank you!

that's great how are you using the Timed script did you add it to my script?

I would love to see the code that you're using now :-)

Something like this

<script type="text/javascript">
if(ning.CurrentProfile == null){
    setTimeout(function(){location.href = "http://www.planetabalada.com/main/authorization/signUp?"},30000);
}
</script>

That's right, thanks for the tip!

Do you know if there is a way to instead of redirecting the page, it open a pop out to the registration page? Seemed like Facebook does?

Thank you again!

Sorry it took so long but I had to make sure this code I just wrote is working Correctly

this is what I came up with hope it works for you

<script type="text/JavaScript">

if(ning.CurrentProfile == null){
  SW=window.open('http://4himalone.ning.com/main/authorization/signIn','NewWin','toolbar=no,status=no,width=750,height=635')  // change the url of the pop-up
// -->
  SW.moveTo(190,240);  // change this line to adjust the placement of the popup
}
// -->
</script>

</head>

<body onLoad="setTimeout('openPopup()', 1000);">

Thank you!
The only problem I see is that popup blockers do not leave open.
But you are to be congratulated! Very good trablho!
Thank you!

LOL that's what I was thinking but you asked for the Script :-)

thank you for the compliment Ork :)

I'm really a CSS code person I'm just starting to play with JavaScript.  I figure combining the two skills I could give out some really good tips. So I'll keep working on my Java codes.  Eventually I'll have Java codes down pat!!  well hopefully lol

RSS

Latest Activity

Fire-Tech replied to Alex's discussion 'More styling in the Design Studio'
"Good job! I would suggest a check box to move the ningbar to the bottom of the page when…"
3 hours ago
Allison Leahy replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"Hi Peggy! Sorry for the slow response here. The designers used Eagle for the headlines and Gotham…"
4 hours ago
Liliana Parra replied to John Bizley's discussion 'Show Your Ning 3.0 Sites'
"Mine is here... Disaster Risk Management (Spanish) http://gestiondelriesgo.ning.com/"
4 hours ago
Allison Leahy replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Absolutely! Thanks for bringing it to my attention, and for your patience as always."
4 hours ago
Allison Leahy replied to Dw Alternatio's discussion 'Any way to change to a 3.0 network?'
"Hey Dw, So glad to hear you're interested in checking out the redesign! Make sure that after…"
4 hours ago

NC for Hire
Jen replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Thanks Allison. I have spent hours trying to fix this. That's great news!"
5 hours ago
Allison Leahy replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Just got the word that the release had no impact the mobile menu and a feature improvement has…"
5 hours ago
Allison Leahy replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Interesting quirk. Thanks for the note."
5 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service