Page 1 of 1

Quickly password protect a page

Posted: Fri Dec 04, 2009 3:33 pm
by minneapolis_dan
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:

Code: Select all

<?php include("/home/username/public_html/password_protect.php"); ?>
- 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

Code: Select all

{password_protect}
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.

Re: Quickly password protect a page

Posted: Thu Dec 24, 2009 4:09 am
by hexdj
Isn't it easier to install FEU and Custom Content?

Re: Quickly password protect a page

Posted: Tue Dec 29, 2009 10:41 pm
by carasmo
I can't figure out FEU or customcontent at all. There's hardly any instructions and I'm not a programmer. This is much better for me.

Re: Quickly password protect a page

Posted: Wed Dec 30, 2009 1:27 am
by hexdj
@carasmo:

Have a look at these really helpful Visual Tutorials (particularly #4 & #5) they're pretty easy to understand, at least I thought so when I knew very little about FEU, I think I used to password protect my pages in a similar way as suggested by the original poster, but the benefits of FEU/Custom Content are really worth it.

Re: Quickly password protect a page

Posted: Wed Dec 30, 2009 1:29 am
by jmcgin51
carasmo wrote: I can't figure out FEU or customcontent at all. There's hardly any instructions and I'm not a programmer. This is much better for me.
IMHO, it is as easy or easier to use FEU/CC than to go to the trouble you went to to find a 3rd-party script and integrate it into your CMSMS installation.  No need to be a programmer, just be able to read and follow simple instructions.  (No offense intended, but it really is just that easy.)  And if you have questions, just ask! :D

Re: Quickly password protect a page

Posted: Wed Dec 30, 2009 4:54 am
by Jeff

Re: Quickly password protect a page

Posted: Wed Dec 30, 2009 6:09 pm
by carasmo
Thanks! The video really helped, I'm reading the pdf now.