Log In · Register

 
PRIVATE BLOGGING CODE
PEACHiALiTY
post Jul 13 2004, 06:16 PM
Post #1


Member
**

Group: Member
Posts: 14
Joined: May 2004
Member No: 18,856



help!! i'm having problems with the private blogging code. the code works and it blocks out people, but nobody on the list that i've added, including myself, can read my xanga. i'm pretty sure i've followed all the directions carefully. the names are in lowercase, there's no comma after teh last name, and.. well i'm all out of ideas. please help!
 
 
Start new topic
Replies (1 - 3)
sherryvu
post Jul 13 2004, 06:31 PM
Post #2


Senior Member
*******

Group: Member
Posts: 3,826
Joined: Jan 2004
Member No: 2,330



can you please post the code so we can see what's wrong with it? _smile.gif
 
PEACHiALiTY
post Jul 16 2004, 12:37 AM
Post #3


Member
**

Group: Member
Posts: 14
Joined: May 2004
Member No: 18,856



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 -->
 
sherryvu
post Jul 16 2004, 10:21 AM
Post #4


Senior Member
*******

Group: Member
Posts: 3,826
Joined: Jan 2004
Member No: 2,330



i meant post the one you are using exactly because you may have missed putting in a comma or something... wink.gif
well it works for me.. check to see if you have a comma after every name except for the last one. all the quotation marks are in place. and that you didn't accidently delete a small part of the code. if you want, you can send me your code and i'll check to see what's wrong with it. or you can pm me the names you want on the list and i'll do it for you. happy.gif
 

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