How can I Password Protect a specific Forum?
4 posters
Page 1 of 1
How can I Password Protect a specific Forum?
Hi all,
How can I Password Protect a specific forum with password in my forum with JavaScript and/or CSS? I have tried some of the tuturials here without success. Furthermore I was red the tutorials in AvacWeb:
I am using the following javascripts:
Are these scripts correct or must I put them in one script?
* My Forum Version is PHPBB2.
Best Regards,
Dark-Avenger
How can I Password Protect a specific forum with password in my forum with JavaScript and/or CSS? I have tried some of the tuturials here without success. Furthermore I was red the tutorials in AvacWeb:
- Spoiler:
I am using the following javascripts:
- Spoiler:
- 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):alert("Invalid Password"),window.location.reload())}};
- Spoiler:
- Code:
fpass.add('1', 'This is a Password Protected Forum. Please Enter the Password:', 'password');
Are these scripts correct or must I put them in one script?
* My Forum Version is PHPBB2.
Best Regards,
Dark-Avenger
Last edited by Dark-Avenger on Wed 30 Oct 2013 - 14:18; edited 3 times in total
Re: How can I Password Protect a specific Forum?
I am coding a JS mod that will do this; the password protect for forums is a relatively simple patch, but this is not its only function, so it might be a few weeks before it is finished.
Re: How can I Password Protect a specific Forum?
Hi, I tested it out on my forum and it worked.
Can you please check if there are scripts conflicting with these code? You can do that by trying to delete one script (Make sure you have a hard copy of it) and see if there'll be an effect to the Password script and then put it back if it doesn't
Can you please check if there are scripts conflicting with these code? You can do that by trying to delete one script (Make sure you have a hard copy of it) and see if there'll be an effect to the Password script and then put it back if it doesn't
Re: How can I Password Protect a specific Forum?
Hi all,
I have clean all other javascripts and placed these in two javascripts and the codes are:
Javascript For Password Protected Forums
Main Javascript for forum password protection
Best Regards,
Dark-Avenger
I have clean all other javascripts and placed these in two javascripts and the codes are:
Javascript For Password Protected Forums
- Spoiler:
- Code:
fpass.add('71', 'This is a Password Protected Forum. Please Enter the Password:', 'testing');
Main Javascript for forum password protection
- Spoiler:
- 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):alert("Invalid Password"),window.location.reload())}};[/spoiler]
Best Regards,
Dark-Avenger
Re: How can I Password Protect a specific Forum?
Ok guys I have fix it. I was put the two scripts into one and disabled the Google Analytics Javascript. That JavaScript conflicts the Forum Password Protection Javascript.
Thank you all for your assistance.
Best Regards,
Dark-Avenger
Thank you all for your assistance.
Best Regards,
Dark-Avenger
Re: How can I Password Protect a specific Forum?
Dark-Avenger wrote:Hi all,
I have clean all other javascripts and placed these in two javascripts and the codes are:
Javascript For Password Protected Forums
- Spoiler:
- Code:
fpass.add('71', 'This is a Password Protected Forum. Please Enter the Password:', 'testing');
Main Javascript for forum password protectionI ve just placed them and I have removed the forum cookies but its not working.
- Spoiler:
- 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):alert("Invalid Password"),window.location.reload())}};[/spoiler]
Best Regards,
Dark-Avenger
Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead!Dark-Avenger wrote:Ok guys I have fix it. I was put the two scripts into one and disabled the Google Analytics Javascript. That JavaScript conflicts the Forum Password Protection Javascript.
Thank you all for your assistance.
Best Regards,
Dark-Avenger
Topic Solved & Locked.
Similar topics
» Being able to password protect a forum
» password protect my forum
» Password protect on each forum
» Can you password protect a forum
» Password protect
» password protect my forum
» Password protect on each forum
» Can you password protect a forum
» Password protect
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum