xanga help..logging in |
![]() ![]() |
xanga help..logging in |
Apr 17 2006, 04:50 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Member Posts: 18 Joined: Aug 2005 Member No: 217,875 |
is there a script for xanga when you visit a xanga you have to log in in order to view it?
|
|
|
|
Apr 17 2006, 05:55 PM
Post
#2
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Into custom header.
CODE <!-- Part I of Block Users Script submitted by xanga.com/sherrys_designs --> Into webstats.<script LANGUAGE="JavaScript"> function redirect () { location.href = 'http://www.xanga.com/signin.aspx'; } </SCRIPT> CODE <!-- Part II of Block Users Script submitted by xanga.com/sherrys_designs --> <script language="javascript"> function getXName() { for (var i = 0; i < document.links.length; i++) { if (document.links[i].href.substring(0,38)=="http://www.xanga.com/private/home.aspx") { var link = document.links[i]; var text = document.all ? link.innerText : link.text ? link.text : ''; return text; break; }} return null; } xName = getXName(); if (xName == 'USERNAME' || xName == 'USERNAME' || xName == null) { alert("Sorry, you are either blocked from this site or not logged in."); redirect(); } </script> QUOTE Description: This script blocks unwanted visitors and unregistered guests from viewing your xanga. A pop-up will come up telling them that they've been blocked, and then it will redirect the visitor to another page. (The pop-up is optional, see "customizing the script" if you want it removed. Right now, it is set to redirect to the sign-in page. Depending on what codes you have on your xanga, the blocked user may or may not see your page, before getting redirected. What I do (even though I think it's an annoying script to have) is put a splash screen script on the page, so all they see when it's finished loading, is the splash image or text.
Customizing the Script: - Replace QUOTE USERNAME with the username of who you want blocked. - To add more users to the list, just follow the pattern and add QUOTE || xName == 'USERNAME' behind each QUOTE USERNAME' - To change the message that appears on the pop up, replace QUOTE Sorry, you are either blocked from this site or not logged in. with your own message. - If you do not want the pop-up to appear, and have the blocked user be immediately redirected, remove this line from the script QUOTE alert("Sorry, you are either blocked from this site or not logged in."); - To change where the blocked user gets redirected to, change QUOTE to your desired target. This can be found in "Part I" or the "Header" part of the script. |
|
|
|
Apr 18 2006, 04:05 PM
Post
#3
|
|
|
Member ![]() ![]() Group: Member Posts: 18 Joined: Aug 2005 Member No: 217,875 |
heh ty
you can close this now |
|
|
|
![]() ![]() |