UPDATE 09/17/2015
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
These scripts will redirect any Nonmember/visitor to your Sign in, Sign-up page or any page you prefer.
Just change the word "signIn?" to "signUp?" In the codes below to have it redirect to the signup page instead of the sign in page.
To redirect to any other page just replace "/main/authorization/signIn?" with the page link you prefer.
Add the code to your ( Custom Code - End of Page Code box ) it could take a couple minutes for the script to take effect because of your catch. For an individual page just place the code in your "above footer HTML box" or "Below header HTML box"
NEW 09/17/2015
Redirect Nonmember Click Block
Nonmembers can now view the pages as long as they want but as soon as they click anything it will redirect them to the signin or signup page. Just change the word "signIn?" to "signUp?" In the code below to have it redirect to the signup page instead of the sign in page.
<script src="http://bit.ly/1YhBZCP" type="text/javascript" title="GEOCOMs_nonmembers_block"></script>
if(ning.CurrentProfile == null){
location.href = "/main/authorization/signIn?";
}
</script>
timed redirect
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
if(ning.CurrentProfile == null){
setTimeout(function() { location.href = '/main/authorization/signIn?'; },9000 );
}
</script>
Replies
George, Perfect! Works like a charm! Thank you kindly Sir!!!
Adam, you're welcome and thank you for the idea. It makes an awesome redirect option in this discussion.
You have a wonderful day.
came in handy today on my personal site. thanks G!
You're welcome JFarrow. :) I'm not sure if I've seen your personal site yet, I would love to check it out. :)
Hello, i have a ning 2.0 website. where can i add this redirect script? on which page?
Hello Petra, the code would go in your "NC custom code box", If you're the network owner you would go to the "dashboard" then select your "Custom code box".. You have a great day. :)
oke, I found it! But in this code box is already an other code (for google analitics)? Can i place two codes? or only one?