Password protect on each forum
3 posters
Page 1 of 1
Password protect on each forum
So I've seen this happen to many, many other forums but however aren't Forumotion, as well as read different threads to people actually accomplishing this, so I'm asking everyone out there who knows how to successfully code this, can you please help me out?
I'm looking to adding a password entry upon each forum of my desire. With looking at my username, you can tell my forum is most likely to be about a school in Harry Potter, right? Well, in Harry Potter, for students to enter their Common Rooms, they must know the password for the door to swing open. This is what I'm requesting of you. Do you know the necessary coding for this to come alive? For a person to click on a forum labelled as Common Room, a text box would come up with a password, for the students to be able to enter the forum, they must know, letter for letter, number for number, the exact password, and once they hit "enter" or "submit" or whatever the entry button is, then they would be able to enter the forum.
I know this is possible, so please don't tell me to bring this up as a suggestion, all I'm asking for is your help. Thank you.
I'm looking to adding a password entry upon each forum of my desire. With looking at my username, you can tell my forum is most likely to be about a school in Harry Potter, right? Well, in Harry Potter, for students to enter their Common Rooms, they must know the password for the door to swing open. This is what I'm requesting of you. Do you know the necessary coding for this to come alive? For a person to click on a forum labelled as Common Room, a text box would come up with a password, for the students to be able to enter the forum, they must know, letter for letter, number for number, the exact password, and once they hit "enter" or "submit" or whatever the entry button is, then they would be able to enter the forum.
I know this is possible, so please don't tell me to bring this up as a suggestion, all I'm asking for is your help. Thank you.
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Thanks mate, it worked. Is there anyway I can have this password protection feature without the white background so that it uses my background, header and footer?
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
That's not what I mean, I'm saying when you click on the forum it stays on the same page but shows the password entry box, then when you enter the correct password it will move to the different page. Is there a way to do this? Please help me out mate.
Edit: There's a new big problem.. when you click on the forum and the password screen comes up, and if you do not know the password, when you try and click cancel, it for some reason still keeps the password screen up and disables you to close the browser or anything, so I had to alt force close, some of my members needed to reboot their PC's. Help.
Edit: There's a new big problem.. when you click on the forum and the password screen comes up, and if you do not know the password, when you try and click cancel, it for some reason still keeps the password screen up and disables you to close the browser or anything, so I had to alt force close, some of my members needed to reboot their PC's. Help.
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
No it doesn't mate, it just brings me back to the password screen for some reason.. know what I can do to fix this?
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Okay I got like 2 different problems with this now..
1. When I click cancel it works but when you enter the password correctly it redirects to the site's index page and not the forum I set it to..
2. When you enter the password the correctly it doesn't ask you for it again..
1. When I click cancel it works but when you enter the password correctly it redirects to the site's index page and not the forum I set it to..
2. When you enter the password the correctly it doesn't ask you for it again..
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
How can I close a forum in here?
I don't see anywhere the info on how to close a forum we have just created.
THank you
I don't see anywhere the info on how to close a forum we have just created.
THank you
forexrobert- New Member
- Posts : 6
Reputation : 1
Language : english
Re: Password protect on each forum
forexrobert wrote:How can I close a forum in here?
I don't see anywhere the info on how to close a forum we have just created.
THank you
What do you mean close? Like delete it? If so, just go to the Admin Panel -> General -> Categories and Forums -> choose the forum you created and click on the red X to delete it.
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Rideem3 wrote:Your second problem isn't a problem. That's meant to happen. It's for convenience. You've entered it once you shouldn't have to again.HogwartsAcademy wrote:Okay I got like 2 different problems with this now..
1. When I click cancel it works but when you enter the password correctly it redirects to the site's index page and not the forum I set it to..
2. When you enter the password the correctly it doesn't ask you for it again..
Well what if I change the password? And what about the first question mate?
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Rideem3 wrote:Can you link me to the password protected forum?
Also, once the user deletes his cookies he has to enter the password again.
I can't because you need to be logged in to view it, am I allowed to let you use my admin login info?
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Done.
P.S. Do you find anything wrong with the background of my forum, like when you scroll to the right or left the background only moves but the content doesn't.. maybe it's a CSS problem or just a problem with the theme..
P.S. Do you find anything wrong with the background of my forum, like when you scroll to the right or left the background only moves but the content doesn't.. maybe it's a CSS problem or just a problem with the theme..
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
This is amazing mate, I thank you 100%, is there a code that prompts you to enter the password everytime you click on the forum?
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
I tried replacing that with the main code now it doesn't even ask for a password.. lol
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Try this code
Replace abc with your password
Incorect with your message if isn't good password.
Redirect with link
- Code:
<script>
function checkform(form)
{
if (form.pass.value != "abc" )
{
alert('incorect');
return false;
}
}
</script>
<form method="post" onsubmit="return checkform(this);" name="password" action="redirect"><label><input value="Scrieti parola aici..." name="pass" onclick="if (this.value == 'Scrieti parola aici...') this.value = '';" onblur="if (this.value == '') this.value = 'Scrieti parola aici...';" type="text"></label> <input name="ok" value="Autentificare" type="submit"></form>
Replace abc with your password
Incorect with your message if isn't good password.
Redirect with link
Re: Password protect on each forum
RicYiu wrote:Try this code
- Code:
<script>
function checkform(form)
{
if (form.pass.value != "abc" )
{
alert('incorect');
return false;
}
}
</script>
<form method="post" onsubmit="return checkform(this);" name="password" action="redirect"><label><input value="Scrieti parola aici..." name="pass" onclick="if (this.value == 'Scrieti parola aici...') this.value = '';" onblur="if (this.value == '') this.value = 'Scrieti parola aici...';" type="text"></label> <input name="ok" value="Autentificare" type="submit"></form>
Replace abc with your password
Incorect with your message if isn't good password.
Redirect with link
How can I modify this to add more than one forum? Also mate, I think if I can't figure out Rideem's idea, I will turn back to you, thank you brother.
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
You make other "fake" category and add your real cateogry in them.
Re: Password protect on each forum
Thank you.
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Rideem3 wrote:Try this:
- Code:
var fpass={add:function(a,b,c){a=RegExp("f"+a+"-");a.test(window.location.pathname.substr(1))&&(window.stop(),prompt(b)==c?window.location.reload():(alert("Invalid Password"),window.location.pathname="/forum"))}};
It brings the Password up but when you click enter it redirects to pw screen again, and if you don't get it right it says invalid then redirects to forum.
Want to use the Admin Acc again?
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Rideem3 wrote:No, that's not necessarry. You can't make it ask for the password every time because you won't be able to view the forum at all.
Okay.. how can I make it ask for it once again..
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Rideem3 wrote:Use this code:
- Code:
var fpass={add:function(a,b,c){a=RegExp("f"+a+"-");a.test(window.location.pathname.substr(1))&&!my_getcookie("forumpass_"+window.location.pathname.substring(1,window.location.pathname.indexOf("-")))&&(window.stop(),prompt(b)==c?(my_setcookie("forumpass_"+window.location.pathname.substring(1,window.location.pathname.indexOf("-")),!1),window.location.reload()):alert("Invalid Password"),window.location.pathname="/forum")}};
It does the same thing lad, when you enter the password correctly it redirects to the forum index page..
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English
Re: Password protect on each forum
Works. Finally man everything is great, solved.
HogwartsAcademy- Forumember
- Posts : 474
Reputation : 1
Language : English

» password protect forum
» Password Protect Forum
» How can I Password Protect a specific Forum?
» Can you password protect a forum
» password protect my forum
» Password Protect Forum
» How can I Password Protect a specific Forum?
» Can you password protect a forum
» password protect my forum
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum