Log In · Register

 
Stop viewing my xanga?, Can I stop people from viewing
oomamasitaxx
post Aug 21 2004, 10:55 AM
Post #1


Senior Member
***

Group: Member
Posts: 53
Joined: Aug 2004
Member No: 38,459



I was just wondering...I dont want certain people viewing my xanga. Is there way??? blink.gif
 
 
Start new topic
Replies
espionage
post Aug 22 2004, 12:51 AM
Post #2


Stalking Createblog...
****

Group: Member
Posts: 155
Joined: Jan 2004
Member No: 1,300



(This script is taken from Createblog.com Scripts, but I can't really lecture you about going there first cuz the name is so weird... "private blogging script".)

Here's the code that allows you to do the opposite of what you wanted, but still... same results... insert usernames of people you want to have access to your xanga - the rest cannot see it; Instead, they get the notification (Message is editted near bottom in place of "Sorry this is a private blog!") and below that is the command to go back to the site they were before. You can also redirect them to another page and whatever with those types of commands.

There is a flaw to that script... you can't stop them from subscribing (unless you block them) and if they link to your xanga with no history in their browser, the command of "go back" is void and they stay there (which is why I recommend using the redirect command).

It's late yawn.gif so I'm too lazy to find the redirect code... PM me if you don't know and I'll get to you as soon as possible tomorrow. biggrin.gif

CODE
<!-- begin code provided by createblog.com -->
<script>

// Private Blogging
// By Paul Chen
//  --- Coyote
// Put your list of (exact) names here.
// Make sure they are all lowercase.
// "join" = unregistered viewers
// Go to end of the script and change
// the custom alert message.

var allowed = new Array(
"USERNAME HERE",
"USERNAME HERE",
"USERNAME HERE",
"USERNAME HERE",
"USERNAME HERE"
)

var links = document.getElementsByTagName('a');
name="";

for(i=0;i<links.length;i++)
{
if(links[i].innerText.match(/xanga/i) && links[i+2].innerText.match(/sign out/i)){
i++;
if(links[i].href.match('/private/home.aspx') || links[i].innerText.match('join')){
 name = links[i].innerText.toLowerCase();
 break;
}  
}
}
enter=false;

for(j=0;j<allowed.length;j++)
{
users = allowed[j];
if(users.indexOf(name)==0 && users.length==name.length){
enter=true;
break;
}
}

if(enter!=true){
alert('Sorry, this is a private blog!'); //change the message
history.go(-1);
}
</script>
<!-- end code provided by createblog.com -->
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: