Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« on: November 26, 2007, 02:41:42 pm » |
|
Footers <script> var BoardPro = "BOARD"; var PassPro = "PASSWORD";
var loc = window.location.href.split("/index.php")[0]; //Created by Agent Moose (smcodes.smfforfree3.com) $("a[name='b" + BoardPro + "']").each(function(){ $(this).parent().parent().next().html(""); $(this).parent().parent().next().next().html("<i>Password Protected</i>"); }); function PassProtected(){ var BP = document.getElementsByTagName("a"); for(s=0;s<BP.length;s++){ if(BP[s].className == "nav" && BP[s].href.match("board," + BoardPro)){ document.getElementById("bodyarea").innerHTML = "<br><br><div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>Board Protected</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><br><i>Enter Password:<br>(Password is Case Sensitive)</i><br><input type='text' id='passprotected'/><br><br><input type='button' onclick='PressButton();' value='Enter'/></center></td></tr></table></div></div><br>"; };};}; function PressButton(){ password = document.getElementById("passprotected"); if(password.value == PassPro){ window.location.href = loc + "/index.php/Protected/board," + BoardPro + ".0." + PassPro + ".html" }else if(password.value == ""){ alert("Enter a Password"); }else{ alert("Password is incorrect"); };}; if(!location.href.match("/Protected/board," + BoardPro + ".0." + PassPro + ".html")) PassProtected(); </script> Original Request: http://smcodes.smfforfree3.com/index.php/topic,417.0.htmlBOARD = The Board Number that will be password protected. PASSWORD = The password for the board. The password is case sensative. This is only for one board right now, I am still working on making it work for more than one board.
|
|
« Last Edit: October 17, 2008, 08:13:33 pm by Agent Moose »
|
Report Spam
Logged
|
|
|
|
|
knox1025
Members
Offline
Posts: 50
|
|
« Reply #1 on: November 26, 2007, 05:35:44 pm » |
|
Only One Board? Then I Can't Wait For v.2!!
|
|
|
|
|
Myth
Lightning Guardian
Members
Offline
Gender:
Posts: 28
Ike for Brawl!
|
|
« Reply #2 on: November 27, 2007, 03:11:32 pm » |
|
what does "Board number" mean?
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #3 on: November 27, 2007, 04:51:56 pm » |
|
When you view a board, if you look up at the Address bar, you will see something like this:
board,3
The Red number will be the board number.
|
|
|
|
Myth
Lightning Guardian
Members
Offline
Gender:
Posts: 28
Ike for Brawl!
|
|
« Reply #4 on: November 27, 2007, 05:54:15 pm » |
|
Ah thanks
|
|
|
|
LaundryLady
Geriatric Goddess
Global Moderator
Offline
Gender:
Posts: 290
I'm watching, I have a sense of humor: Guess Who
|
|
« Reply #5 on: November 27, 2007, 06:07:41 pm » |
|
Boards and Topics, cool. Ok so we can protect one board with a password, but we can't put the script in again for another one?
|
|
|
|
Myth
Lightning Guardian
Members
Offline
Gender:
Posts: 28
Ike for Brawl!
|
|
« Reply #6 on: November 28, 2007, 11:59:28 am » |
|
I don't know...unless you know coding. Which I don't
|
|
|
|
Agent Moose Jr.
Ultra Contagious
Global Moderator
Offline
Gender:
Posts: 1,045
|
|
« Reply #7 on: January 04, 2008, 01:11:09 pm » |
|
nice job
|
Newest:
|
|
|
knox1025
Members
Offline
Posts: 50
|
|
« Reply #8 on: January 31, 2008, 11:20:46 am » |
|
Problem With This Code!
Okay, It Works Fine If You Are Going To Tha Locked Board From Tha Index.
But, If You View a Topic In 'Recent Posts' That Is IN Tha LOCKED Board, It Asks You For No Password, an Any1 Can Enter Tha Board.
Any Way To Fix This?
Or Maybe Set Tha Locked Board To NOT Display In 'Recent Posts'?
|
|
|
|
Myrtle
The Girl With The Forum.
100 Club Member
Offline
Gender:
Posts: 480
Death Note(Credits to Kai): Myrtle_Gail, Myr-chan
|
|
« Reply #9 on: February 05, 2008, 09:15:25 am » |
|
Thanks, there were problems about this certain topic of "hacking" in my forum. So thanks
|
|
|
|
PixelatedDaydreams
Newcomers!
Offline
Posts: 1
|
|
« Reply #10 on: February 26, 2008, 10:46:54 am » |
|
i tried this code in my forum... but for some reason it isn't working. all my members can still get in...is there something im doing wrong?
|
|
|
|
|
knox1025
Members
Offline
Posts: 50
|
|
« Reply #12 on: April 29, 2008, 11:29:31 pm » |
|
Problem With This Code!
Okay, It Works Fine If You Are Going To Tha Locked Board From Tha Index.
But, If You View a Topic In 'Recent Posts' That Is IN Tha LOCKED Board, It Asks You For No Password, an Any1 Can Enter Tha Board.
Any Way To Fix This?
Or Maybe Set Tha Locked Board To NOT Display In 'Recent Posts'?
Nobody Read That? Lol.. Is v.2 Out Yet?
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
|
« Reply #13 on: April 30, 2008, 12:44:06 am » |
|
hmm dnno
dont thnik moosey saw it
and i think its only v1 i think moosey forgot about this lol
he did post this last november
legend 1234
|
|
|
|
FinishTheFight
Newcomers!
Offline
Gender:
Posts: 3
Smiles all around!
|
THIS IS AWESOME! I was looking for something similar to this. Can you make it password protect topics or at least work on that. I made a request for it on smfsupport.
|
|
|
|
|
|