Quickly password protect a page

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Locked
minneapolis_dan
Forum Members
Forum Members
Posts: 36
Joined: Tue Jun 19, 2007 10:20 pm

Quickly password protect a page

Post 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.
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: Quickly password protect a page

Post by hexdj »

Isn't it easier to install FEU and Custom Content?
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Quickly password protect a page

Post 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.
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: Quickly password protect a page

Post 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.
Last edited by hexdj on Wed Dec 30, 2009 6:27 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Quickly password protect a page

Post 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
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Quickly password protect a page

Post by Jeff »

carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Quickly password protect a page

Post by carasmo »

Thanks! The video really helped, I'm reading the pdf now.
Locked

Return to “Tips and Tricks”