Quickly password protect a page
Posted: Fri Dec 04, 2009 3:33 pm
I needed to password protect a "page" in CMSms, and this was a simple method for me.
- Download a password-protect script from this site
http://www.zubrag.com/scripts/password-protect-advanced.php
- Load the password protect file to a place on your hosting server
- Follow their instructions to generate the correct line of code to include (add the ?help to the URL)
- *Note you can write your own php include tag, you just have to know the full path on your server to the script
Sample code:
- Create a user-defined tag in CMSms with this new line of code (and leave out the ), name it password_protect
- add your user-defined tag to the page you want to protect, under the Options tag where smarty tags go
- turn off caching on your password-protected page
That was it for me. You can go in to the password-protect.php file and style it a bit if you like, and create your own user names/password combinations.
Maybe someone else will find this helpful. That same URL above has links to a forum for specific help with the script.
- Download a password-protect script from this site
http://www.zubrag.com/scripts/password-protect-advanced.php
- Load the password protect file to a place on your hosting server
- Follow their instructions to generate the correct line of code to include (add the ?help to the URL)
- *Note you can write your own php include tag, you just have to know the full path on your server to the script
Sample code:
Code: Select all
<?php include("/home/username/public_html/password_protect.php"); ?>
- add your user-defined tag
Code: Select all
{password_protect}
- turn off caching on your password-protected page
That was it for me. You can go in to the password-protect.php file and style it a bit if you like, and create your own user names/password combinations.
Maybe someone else will find this helpful. That same URL above has links to a forum for specific help with the script.