PRIVATE BLOGGING CODE |
PRIVATE BLOGGING CODE |
![]()
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!
|
|
|
![]() |
![]()
Post
#2
|
|
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 --> |
|
|
![]() ![]() |